Skip to content

Commit 564dbc7

Browse files
author
djns1
committed
Eves bms
1 parent 6d40cbc commit 564dbc7

File tree

9 files changed

+65
-17
lines changed

9 files changed

+65
-17
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module simple_op(in_out1,in_out2,en);
2+
inout in_out1;
3+
inout in_out2;
4+
input en;
5+
6+
assign in_out1 = (en) ? in_out2 : 1'b1;
7+
assign in_out2 = (!en) ? in_out1 : 1'b0;
8+
endmodule
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
GLOBAL_SIM_BASE_CLK en in_out1 in_out2
2+
0 1 z z
3+
1 0 z z
4+
0 1 z 0
5+
1 1 z 1
6+
0 0 1 z
7+
1 0 0 z
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
in_out1 in_out2
2+
0 0
3+
1 1
4+
0 0
5+
0 x
6+
1 1
7+
x 1
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
module selector(input sel, input in, output out, inout io);
2-
// Select if selector is set
3-
assign io = (sel) ? in : 1'bz;
4-
assign out = io;
5-
endmodule
1+
//module selector(input sel, input in, inout io);
2+
// // Select if selector is set
3+
// assign io = (sel) ? in : 1'bz;
4+
//endmodule
65

76
module inout_basic(input line_sel, input in1, input in2, output out);
8-
tri internal;
9-
tri wip;
7+
wire internal;
108
wire not_sel;
119
assign not_sel = !line_sel;
12-
// Select in1 if oe
13-
selector s1( line_sel, in1, wip, internal, internal );
14-
// Selects in2 if !oe
15-
selector s2( not_sel, in2, wip, internal, internal );
16-
assign out = wip;
10+
// Select in1 if line_sel
11+
selector s1( line_sel, in1, internal );
12+
// Selects in2 if !line_sel
13+
selector s2( not_sel, in2, internal );
14+
assign out = internal;
1715
endmodule
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
module simple_op(in,in_out1,in_out2,en,out);
3+
input in;
4+
inout reg in_out1;
5+
inout reg in_out2;
6+
input en;
7+
output out;
8+
9+
assign in_out1 = (en) ? in : 1'bz;
10+
assign out = in_out2;
11+
endmodule

ODIN_II/regression_test/benchmark/verilog/syntax/inout-syntax/inout_manual_impl.v

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ module selector_manual(input sel, input in, output out, input io_in, output io_o
55
endmodule
66

77
module inout_manual(input line_sel, input in1, input in2, output out);
8-
tri internal;
9-
tri wip;
8+
wire internal;
109
wire not_sel;
1110
assign not_sel = !line_sel;
1211
// Select in1 if oe
13-
selector_manual s1( line_sel, in1, wip, internal, internal );
12+
selector_manual s1( line_sel, in1, internal, internal );
1413
// Selects in2 if !oe
15-
selector_manual s2( not_sel, in2, wip, internal, internal );
16-
assign out = wip;
14+
selector_manual s2( not_sel, in2, internal, internal );
15+
assign out = internal;
1716
endmodule
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module simple_op(in,in_out1,in_out2,en,out);
2+
input in;
3+
inout wire in_out1;
4+
inout wire in_out2;
5+
input en;
6+
output out;
7+
8+
assign in_out1 = (en) ? in : 1'bz;
9+
assign out = in_out2;
10+
endmodule
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
GLOBAL_SIM_BASE_CLK en in in_out2
2+
0 0 1 1
3+
0 1 0 0
4+
0 1 1 1
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
in_out2 out
2+
z 1
3+
0 0
4+
1 1

0 commit comments

Comments
 (0)