i try to simulate [1:0]flip-flop in ModelSim and i see one normal signal(out_inf[0]) and one blue signal(out_inf[1]). What is it?
Dima P. wrote: > What is it? Depends somewhat on your code... But by default blue means high-Z.
testbench tdff.v
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
whats the difference between in_inf[0] and in_inf[1]
Dima P. wrote: > whats the difference between in_inf[0] and in_inf[1] Thats remains the question. What you posted is the test bench. That obvoiusly works properly...
thanks, but why out_inf[1] is hi-z? how do i see normal(not blue) signal as out_inf[1]?
Dima P. wrote: > thanks, but why out_inf[1] is hi-z? Thats in the up to now secret code of the flipflop itself. What you posted generates the clk and the in_inf signals. And they are fine.
thanks, the bug in the "secret code" indeed ))
And whats mean red signal 1'hx out_inf[0]?
Guest
#5425913
Dima P. wrote: > And whats mean red signal 1'hx out_inf[0]? Behind the h is the value of the signal, in this case X. If you look up the definition of std_(u)logic you see, that this means 'unknown'. (Like Z means 'High Impedance')
But the signal must be zero (not unknown)
Guest
#5426340
Probably the signal is not initialised. The signal is assigned a value on the rising edge of the clock. So before the first rising edge, there is no assignment, so the signal value is unknown. But I'd expect U instead of X.
Dima P. wrote: > But the signal must be zero (not unknown) 'U' does NOT mean "Unknown"! 'U' is "Uninitialized". Why don't you show your code for better guessing?
new dff.v
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
new tdff.v
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
That looks OK, what's the problem with it?
the signal is red (before first clock). Why?
Guest
#5426573
Dima P. wrote: > the signal is red (before first clock). Why? I explained before. Which value do you expect and why?
can i initialize value before first clock?
i try to initialize value in dff.v
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
testbench doesnt work
Dima P. wrote: > testbench doesnt work What message? > i try to initialize value in dff.v As you can easily see: dout is making trouble to you. And therefore you must initialize dout. That are your flipflops!
ok, thank you
Reply
Please log in before posting.

