`timescale 1ns/1ps //********************************************************* module Test_MQCAwire; //********************************************************* parameter reset=2'b00; parameter switch=2'b01; parameter hold=2'b10; wire[5:0] v [5:0]; reg [1:0] s [3:0]; wire in1; reg rin1; wire out1; // Instantiate the cells // input N, E, S, W; //QCAcell Q11(v(1,2), v(2,2), v(2,1), v(2,0), v(1,0), v(0,0),v(0,1),v(0,2), v(1,1),s(1,1)); /* N 0 1 2 3 4 5 0 1 W(in1) 2 X X X X X X E 3 4 5 S */ // N E S W MQCAcell Q02(nocell, v[1][2], nocell, in, v[0][2], clock); //input 1 MQCAcell Q12(nocell, v[2][2], nocell, v[0][2], v[1][2], clock); //wire MQCAcell Q22(nocell, v[3][2], nocell, v[1][2], v[2][2], clock); //wire MQCAcell Q32(nocell, v[4][2], nocell, v[2][2], v[3][2], clock); //wire MQCAcell Q42(nocell, v[5][2], nocell, v[3][2], v[4][2], clock); //wire MQCAcell Q52(nocell, nocell, nocell, v[4][2], out, clock); //output always #100 s[0] = (s[0] + 1) % 3; always #100 s[1] = (s[1] + 1) % 3; always #100 s[2] = (s[2] + 1) % 3; assign in1 = rin1; initial begin $dumpvars(0,Test_MQCAwire); //dice fino a che livello fare il dump dei segnali rin1 = 1'b0; // time = 0 s[2] =switch; s[1] =hold; s[0] =reset; rin1 <= #130 1'b1; rin1 <= #130 1'b0; rin1 <= #130 1'bz; rin1 = #300 1'b1; $finish; end endmodule