2 // test_intermout_always_comb_1_test.v
3 module f1_test(a, b, c, d, z);
8 always @(a or b or c or d)
17 // test_intermout_always_comb_3_test.v
18 module f2_test (in1, in2, out);
22 always @ ( in1 or in2)
29 // test_intermout_always_comb_4_test.v
30 module f3_test(a, b, c);
34 always @(b or c) begin
40 // test_intermout_always_comb_5_test.v
41 module f4_test(ctrl, in1, in2, out);
46 always @ (ctrl or in1 or in2)
53 // test_intermout_always_ff_3_test.v
54 module f5_NonBlockingEx(clk, merge, er, xmit, fddi, claim);
55 input clk, merge, er, xmit, fddi;
70 // test_intermout_always_ff_4_test.v
71 module f6_FlipFlop(clk, cs, ns);
83 // test_intermout_always_ff_5_test.v
84 module f7_FlipFlop(clock, cs, ns);
90 always @(posedge clock)
98 // test_intermout_always_ff_6_test.v
99 module f8_inc(clock, counter);
102 output reg [3:0] counter;
103 always @(posedge clock)
104 counter <= counter + 1;
107 // test_intermout_always_ff_8_test.v
108 module f9_NegEdgeClock(q, d, clk, reset);
112 always @(negedge clk or negedge reset)
120 // test_intermout_always_ff_9_test.v
121 module f10_MyCounter (clock, preset, updown, presetdata, counter);
122 input clock, preset, updown;
123 input [1: 0] presetdata;
124 output reg [1:0] counter;
126 always @(posedge clock)
128 counter <= presetdata;
131 counter <= counter + 1;
133 counter <= counter - 1;
136 // test_intermout_always_latch_1_test.v
137 module f11_test(en, in, out);
140 output reg [2:0] out;
147 // test_intermout_bufrm_1_test.v
148 module f12_test(input in, output out);
153 // test_intermout_bufrm_2_test.v
154 module f13_test(input in, output out);
155 //intermediate buffers should be removed
162 // test_intermout_bufrm_6_test.v
163 module f14_test(in, out);
172 f14_mybuf _f14_mybuf(w2, w3);
175 module f14_mybuf(in, out);
186 // test_intermout_bufrm_7_test.v
187 module f15_test(in1, in2, out);
190 // Y with cluster of f15_mybuf instances at the junction
192 wire w1, w2, w3, w4, w5, w6, w7, w8, w9, w10;
200 f15_mybuf _f15_mybuf0(w2, w3);
201 f15_mybuf _f15_mybuf1(w3, w4);
203 f15_mybuf _f15_mybuf2(w6, w7);
204 f15_mybuf _f15_mybuf3(w7, w4);
206 f15_mybuf _f15_mybuf4(w4, w8);
207 f15_mybuf _f15_mybuf5(w8, w9);
210 module f15_mybuf(in, out);
221 // test_intermout_exprs_add_test.v
222 module f16_test(out, in1, in2, vin1, vin2, vout1);
229 assign out = in1 + in2;
230 assign vout1 = vin1 + vin2;
233 // test_intermout_exprs_binlogic_test.v
234 module f17_test(in1, in2, vin1, vin2, out, vout, vin3, vin4, vout1 );
243 assign out = in1 && in2;
244 assign vout = vin1 && vin2;
245 assign vout1 = vin3 || vin4;
248 // test_intermout_exprs_bitwiseneg_test.v
249 module f18_test(output out, input in, output [1:0] vout, input [1:0] vin);
255 // test_intermout_exprs_buffer_test.v
256 module f19_buffer(in, out, vin, vout);
266 // test_intermout_exprs_condexpr_mux_test.v
267 module f20_test(in1, in2, out, vin1, vin2, vin3, vin4, vout1, vout2, en1, ven1, ven2);
268 input in1, in2, en1, ven1;
271 input [1:0] vin1, vin2, vin3, vin4;
272 output [1:0] vout1, vout2;
274 assign out = en1 ? in1 : in2;
275 assign vout1 = ven1 ? vin1 : vin2;
276 assign vout2 = ven2 ? vin3 : vin4;
279 // test_intermout_exprs_condexpr_tribuf_test.v
280 module f21_test(in, out, en, vin1, vout1, en1);
286 assign out = en ? in : 1'bz;
287 assign vout1 = en1 ? vin1 : 2'bzz;
290 // test_intermout_exprs_constshift_test.v
291 module f22_test(in, out, vin, vout, vin1, vout1, vin2, vout2);
294 input [3:0] vin, vin1, vin2;
295 output [3:0] vout, vout1, vout2;
298 assign out = in << 1;
299 assign vout = vin << 2;
300 assign vout1 = vin1 >> 2;
301 assign vout2 = vin2 >>> 2;
304 // test_intermout_exprs_const_test.v
305 module f23_test (out, vout);
313 // test_intermout_exprs_div_test.v
314 module f24_test(out, in1, in2, vin1, vin2, vout1);
321 assign out = in1 / in2;
322 assign vout1 = vin1 / vin2;
325 // test_intermout_exprs_logicneg_test.v
326 module f25_test(out, vout, in, vin);
334 // test_intermout_exprs_mod_test.v
335 module f26_test(out, in1, in2, vin1, vin2, vout1);
342 assign out = in1 % in2;
343 assign vout1 = vin1 % vin2;
346 // test_intermout_exprs_mul_test.v
347 module f27_test(out, in1, in2, vin1, vin2, vout1);
354 assign out = in1 * in2;
355 assign vout1 = vin1 * vin2;
358 // test_intermout_exprs_redand_test.v
359 module f28_test(output out, input [1:0] vin, output out1, input [3:0] vin1);
365 // test_intermout_exprs_redop_test.v
366 module f29_Reduction (A1, A2, A3, A4, A5, A6, Y1, Y2, Y3, Y4, Y5, Y6);
373 output Y1, Y2, Y3, Y4, Y5, Y6;
374 //reg Y1, Y2, Y3, Y4, Y5, Y6;
375 assign Y1=&A1; //reduction AND
376 assign Y2=|A2; //reduction OR
377 assign Y3=~&A3; //reduction NAND
378 assign Y4=~|A4; //reduction NOR
379 assign Y5=^A5; //reduction XOR
380 assign Y6=~^A6; //reduction XNOR
383 // test_intermout_exprs_sub_test.v
384 module f30_test(out, in1, in2, vin1, vin2, vout1);
391 assign out = in1 - in2;
392 assign vout1 = vin1 - vin2;
395 // test_intermout_exprs_unaryminus_test.v
396 module f31_test(output out, input in, output [31:0] vout, input [31:0] vin);
402 // test_intermout_exprs_unaryplus_test.v
403 module f32_test(output out, input in);
408 // test_intermout_exprs_varshift_test.v
409 module f33_test(vin0, vout0);
411 output reg [7:0] vout0;
413 wire [7:0] myreg0, myreg1, myreg2;
415 assign myreg0 = vout0 << vin0;
417 assign myreg1 = myreg2 >> i;