3,627 questions
2 votes
2 answers
72 views
Proper way of resetting a FSM
I usually work with Xilinx FPGA boards. Based on the documentation I've reviewed and the research I've done, I try to avoid using a global reset signal in my designs as much as possible. However, let'...
2 votes
1 answer
79 views
Not seeing one-cycle delay for register in Modelsim
My register doesn't work properly. The output changes simultaneously with the input. There should be a one-cycle delay, but I am not seeing it from the simulation in Modelsim. Does anyone know why? ...
2 votes
1 answer
85 views
Why is my simple ARM7 data memory on Verilog failing tests?
I'm implementing a simple ARM7 in Verilog and am currently in the process of creating a simple data memory. I've come up with something like this: // very simple sdata implementation with 1mb~ memory ...
1 vote
1 answer
119 views
Random stability with non-random object
I have a simple example for random stability in QuestaSim. module sv_rand_stability; class dummy; rand int data; endclass initial begin dummy d; $display("%...
1 vote
1 answer
99 views
Is conditional bracket pairing possible?
In SystemVerilog is the "property" construct: property <name> <body> endproperty This can then be instantiated as: assert property(<name>); In the language extension ...
-1 votes
1 answer
92 views
What's point of port to port type of connection in TLM? [closed]
In UVM TLM1, there are three main interface types: port — the initiator of a transaction, export — a proxy that forwards port requests to an implementation, imp — the implementation, which contains ...
0 votes
1 answer
63 views
System verilog constraint for queues with fixed number of 6s
Can someone help me with system verilog constraint for the below requirement.1) Fixed queue size of 10 and has four 6s in it at random position. I tried the below constraint to start with. class ...
-1 votes
1 answer
85 views
In a System Verilog FSM can a repetitive State be converted to a Task?
I'm writing an FPGA state machine in System Verilog to read bytes from a SPI port and parse them into commands to the FPGA. The "RXSPIBITS" state is used to read SPI bytes by multiple other ...
4 votes
1 answer
117 views
How can I simulate a simple elevator FSM where it can detect overweight?
I've been doing a finite state machine of an elevator using Verilog. The elevator contains four states: IDLE: When the elevator is stopped. ERROR: When the elevator's weight limit is exceeded. MOVING:...
-1 votes
1 answer
105 views
How to swap inout wires within a contained hierarchy (of which is synthesizable)?
For context, please look at my attached diagram to see what I am trying to accomplish. Essentially, I want to swap inout wires using a contained hierarchy that will allow me to have more modular RTL ...
2 votes
1 answer
82 views
Usage of assign: when to put it in an always or not [duplicate]
I know a lot of people have asked about when to use assign inside always, but I'm wondering if you actually have to. Is it ok to have a module where you have assign statements, but they are not inside ...
1 vote
1 answer
98 views
Should UVM testbench work with pre-synthesis or post-synthesis FPGA code? [closed]
I’m working on an FPGA project and planning to use UVM (Universal Verification Methodology) for verification. I’m confused about the timing of when to apply UVM in the design flow. Should I develop my ...
2 votes
2 answers
169 views
In Vivado, what is "[Synth 8-7213] Expression condition using operand 'x' does not match with the corresponding edges used in event control" error?
When I am doing some development with Verilog and Vivado, I wrote some Verilog code as follows: module min_rep_example_A(input clk, input rst_n, output reg[3:0] LED); always @(posedge clk or ...
0 votes
0 answers
71 views
Why does module instantiation affect output reg value in vivado? [duplicate]
The instantiation module as below: module second_module( input [7:0] d, output reg [7:0] q ); initial q <= ~d; endmodule The top module as below: module top_module( input [7:0] ...
0 votes
1 answer
87 views
`$strobe` and `$display` output different result for the same target
Refer to this question,I write a similar case. module n; reg [1:0]a, b; initial begin a=1; a<=a+1; $strobe("strobe",a); $display("display",a); end endmodule The ...