Honestly bit stuck without your help
The probelm I am talking about is "I can now compile but while simulating I get the following error Illegal inout port "(posted on post 17,18,19,20,21). Please have a look at those posts for me. Many thanks
Honestly bit stuck without your help
The probelm I am talking about is "I can now compile but while simulating I get the following error Illegal inout port "(posted on post 17,18,19,20,21). Please have a look at those posts for me. Many thanks
Code Verilog - [expand] 1 2 // in testbench to access the output_enable tb_inout_sig = !dut.output_enable ? tb_driving_inout_sig : 'bz;
I am wondering why inout was not a problem in my VHDL testbench?( I didn't have to treat it like this??) and I didn't get such errors (plaese have a look at post 19,20) Thanks very much... Sorry I am getting used to the rules and methods. Please bear with me
How can I or anyone else know if this is the solution for your problem, YOU NEVER POSTED YOUR CODE!sonika111 said:I came across this post Is this my solution
https://www.edaboard.com/showthread.php?t=42207
I have couple of inouts?? Do I treat them as in this post and I would get correct stimulus??
Right. I am really confused and sorry to cause you guys confusion. The design is the master where output_enable is defined but TB cannot see it. What can I do in TB?
Give up, I already showed them how to do that in post #25 (which they obviously ignored...so I'll just do the same from now on). At least they can have hierarchical references to signals in any flavour of Verilog.It's a simulation. Everyone can see everyone. Just create a wire in the tb and make an assign to the dut internal signal.
If this really is a bidirectional bus, then the testbench MUST know, with a sideband signal, what direction the data is going. So the DUT MUST output it. Otherwise it CANNOT be a bidirectional bus.
Then post a full testcase like I already suggested that exhibits the exact same problem.I am unable to post the code but the snippet is in post 20. Thanks.
I for one will seldom answer posts where the user doesn't supply any detailed information about the problem (like the code or a testcase of code, if they can't post the real code).
logic oe;
wire [31:0] data_bus_sig;
logic [31:0] data_bus;
assign data_bus_sig = (oe) ? data_bus : 32'bz;
initial
begin
oe <= 1'b0
end
initial
begin
oe <= 1'b1;
data_bus <= f_data;
end
You could have found this out by googling "code tags forum". https://forum.unity.com/threads/using-code-tags-properly.143875/
Why not post what the original VHDL testbench did? then maybe we'll have so idea of how that worked? Your code now implies oe is driven from two initial blocks - and that will cause oe to be X, just like if you were driving it from two processes in VHDL.
code tags are available as a button when you click "go advanced". Or wrap the code in [ code] [ /code] blocks. You could have found this out by googling "code tags forum". https://forum.unity.com/threads/using-code-tags-properly.143875/
Thanks very much. Actually in these initial blocks there are if statements and some waits for posedge(clk) too. It doesn't happen at the same time
In that case is it alright to deal like this
Many thanks
You cannot drive any variable from more than 1 initial block as non-block assignments. It gives you X's when both drive together. Driving them as blocking assignments will just give you a race condition.
See post #35!
Code Verilog - [expand] 1 2 // in testbench to access the output_enable tb_inout_sig = !dut.output_enable ? tb_driving_inout_sig : 'bz;
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 initial begin ..... ... tb.uut.u_inst.oe = 1'b0; tb.uut.oe2 = 1'b0; if(cmd=) begin ....... ........ tb.uut.u_inst.oe = 1'b1; @(posedge clk); ........ ......... tb.uut.oe2 = 1'b1; ...... end end
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?