latebird
Newbie
- Joined
- Feb 22, 2022
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 29
Hello,
I have a verilog design and I don't know why it works...
I think I don't have any other sentences or tri-state logic assigning 'a' to 'port_a', but it is literally working as an 'inout' port, both 'in' and 'out' are functional. The 'assign' should be working one-way, isn't it?
Is it possible that the assignment between two net types will create a 'real' wire, so it works bidirectionally, or, it was optimized by the synthesis tool (synplify pro), I don't know.
Can anyone help?
Thanks!
I have a verilog design and I don't know why it works...
Code:
////Top_level////
module tricky_design(port_a,......);
inout [5:0] port_a; //in & out, physically connects to GPIOs of DSP on my board for read and write.
wire [5:0] a;
assign a = port_a; // Question here!
////submodule////
sub u1(
.D(a), //D is an 'inout' of submodule
...
);
////End of submodule////
endmodule
I think I don't have any other sentences or tri-state logic assigning 'a' to 'port_a', but it is literally working as an 'inout' port, both 'in' and 'out' are functional. The 'assign' should be working one-way, isn't it?
Is it possible that the assignment between two net types will create a 'real' wire, so it works bidirectionally, or, it was optimized by the synthesis tool (synplify pro), I don't know.
Can anyone help?
Thanks!