Compare commits
	
		
			5 Commits
		
	
	
		
			a12b77edd5
			...
			ad318259a5
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | ad318259a5 | ||
|  | 932e967f3d | ||
|  | cf66c0e665 | ||
|  | aa67bd6168 | ||
|  | 78a8f72d25 | 
| @@ -51,64 +51,62 @@ namespace tmpl { | ||||
| //        - the last wl the word to write | ||||
| // data -> the data saved in the flip flop, sized wl x nw | ||||
| export template<pint log_nw,wl,N_dly_cfg> | ||||
| defproc register_rw (avMx1of2<1+log_nw+wl> in; d1of<wl> data[2<<log_nw]; power supply; bool reset_B,reset_mem_B){ | ||||
| defproc register_rw (avMx1of2<1+log_nw+wl> in; d1of<wl> data[2<<log_nw]; power supply; bool? reset_B,reset_mem_B,dly_cfg[N_dly_cfg]){ | ||||
|     bool _in_v_temp,_in_a_temp,_clock_temp,_clock; | ||||
|     pint _nw = 2<<log_nw; | ||||
|     //Validation of the input  | ||||
|     Mx1of2<1+log_nw+wl> in_temp; | ||||
|     (i:1+log_nw+wl:in_temp.d[i] = in.d.d[i];) | ||||
|     vtree<1+log_nw+wl> val_input(.in = in_temp,.out = _in_v_temp, .supply = supply); | ||||
|     Mx1of2<1+log_nw+wl> _in_temp; | ||||
|     (i:1+log_nw+wl:_in_temp.d[i] = in.d.d[i];) | ||||
|     vtree<1+log_nw+wl> val_input(.in = _in_temp,.out = _in_v_temp, .supply = supply); | ||||
|     sigbuf_1output<4> val_input_X(.in = _in_v_temp,.out = in.v,.supply = supply); | ||||
|     in.v = _in_v_temp; | ||||
|     // Generation of the clock pulse | ||||
|     delayprog<N_dly_cfg> dly(.in = _in_v_temp, .s = _clock_temp, .supply = supply); | ||||
|     sigbuf_1output<4> val_input_X(.in = _clock_temp,.out = _clock,.supply = supply); | ||||
|     // Generation of the fake clock pulse | ||||
|     delayprog<N_dly_cfg> clk_dly(.in = _in_v_temp, .out = _clock_temp,.s = dly_cfg, .supply = supply); | ||||
|     sigbuf_1output<4> clk_X(.in = _clock_temp,.out = _clock,.supply = supply); | ||||
|     // Sending back to the ackowledge | ||||
|     delayprog<N_dly_cfg> dly(.in = _clock, .s = _in_a_temp, .supply = supply); | ||||
|     sigbuf_1output<4> val_input_X(.in = _in_a_temp,.out = in.a,.supply = supply); | ||||
|     delayprog<N_dly_cfg> ack_dly(.in = _clock, .out = _in_a_temp,.s = dly_cfg, .supply = supply); | ||||
|     sigbuf_1output<4> ack_input_X(.in = _in_a_temp,.out = in.a,.supply = supply); | ||||
|     //Reset Buffers | ||||
|     bool _reset_BX,_reset_mem_BX,_reset_mem_BXX[_nw*w]; | ||||
|     BUF_X1 reset_buf(.a=reset_B, .y=_reset_BX,.vdd=supply.vdd,.vss=supply.vss); | ||||
|     BUF_X1 reset_buf(.a=reset_mem_B, .y=_reset_mem_BX,.vdd=supply.vdd,.vss=supply.vss); | ||||
|     sigbuf<_nw*wl> reset_bufarray(.in=_reset_mem_BX, .out=_reset_BXX_mem,.vdd=supply.vdd,.vss=supply.vss); | ||||
|     bool _reset_BX,_reset_mem_BX,_reset_mem_BXX[_nw*wl]; | ||||
|     BUF_X1 reset_buf_BX(.a=reset_B, .y=_reset_BX,.vdd=supply.vdd,.vss=supply.vss); | ||||
|     BUF_X1 reset_buf_BXX(.a=reset_mem_B, .y=_reset_mem_BX,.vdd=supply.vdd,.vss=supply.vss); | ||||
|     sigbuf<_nw*wl> reset_bufarray(.in=_reset_mem_BX, .out=_reset_mem_BXX,.supply=supply); | ||||
|     // Creating the different flip flop arrays | ||||
|     bool _nw = 2<<log_nw; | ||||
|     bool _word_idx = 0; | ||||
|     bool _out_encoder[_nw],_clock_word_temp[_nw],_clock_word[_nw]; | ||||
|     bool _out_encoder[_nw],_clock_word_temp[_nw],_clock_word[_nw],_clock_buffer_out[_nw*wl]; | ||||
|     andtree<log_nw> atree[_nw]; | ||||
|     AND2_X1 and_encoder[_nw]; | ||||
|     sigbuf<wl> clock_buffer; | ||||
|     sigbuf<wl> clock_buffer[_nw]; | ||||
|     DFFQ_R_X1 ff[_nw*wl]; | ||||
|     (k:_nw:atree_x[k].supply = supply;) | ||||
|     pint _bitval; | ||||
|     (k:_nw:atree[k].supply = supply;) | ||||
|     (_word_idx:_nw: | ||||
|         // Decoding the bit pattern to understand which word we are looking at | ||||
|         (pin_idx:log_nw: | ||||
|             bitval = (_word_idx & ( 1 << pin_idx )) >> pin_idx; // Get binary digit of integer i, column j | ||||
|             [bitval = 1 ->  | ||||
|                 atree[_word_idx].in[pin_idx] = in.d.d[pin_idx+1].t; | ||||
|             [] bitval = 0 -> | ||||
|                 atree[_word_idx].in[pin_idx] = in.d.d[pin_idx+1].f; | ||||
|             []bitval >= 2 -> {false : "fuck"}; | ||||
|             _bitval = (_word_idx & ( 1 << pin_idx )) >> pin_idx; // Get binary digit of integer i, column j | ||||
|             [_bitval = 1 ->  | ||||
|                 atree[_word_idx].in[pin_idx] = in.d.d[pin_idx+wl].t; | ||||
|             [] _bitval = 0 -> | ||||
|                 atree[_word_idx].in[pin_idx] = in.d.d[pin_idx+wl].f; | ||||
|             []_bitval >= 2 -> {false : "fuck"}; | ||||
|             ] | ||||
|         ) | ||||
|         // Activating the fake clock for the right word | ||||
|         atree_x[_word_idx].out = _out_encoder[_word_idx];     | ||||
|         atree[_word_idx].out = _out_encoder[_word_idx];     | ||||
|         and_encoder[_word_idx].a = _out_encoder[_word_idx]; | ||||
|         and_encoder[_word_idx].b = _clock; | ||||
|         and_encoder[_word_idx].y = _clock_word_temp[_word_idx]; | ||||
|         and_encoder[_word_idx].vdd = supply.vdd; | ||||
|         and_encoder[_word_idx].vss = supply.vss; | ||||
|         clock_buffer[_word_idx].in = _clock_word_temp[_word_idx]; | ||||
|         clock_buffer[_word_idx].out = _clock_word[_word_idx]; | ||||
|         clock_buffer[_word_idx].vdd = supply.vdd; | ||||
|         clock_buffer[_word_idx].vss = supply.vss; | ||||
|         clock_buffer[_word_idx].supply = supply; | ||||
|         // Describing all the FF and their connection | ||||
|         (_bit_idx:wl: | ||||
|             ff[_bit_idx*(1+_word_idx)].clk = _clock_word[_word_idx]; | ||||
|             ff[_bit_idx*(1+_word_idx)].d = in.d.d[_bit_idx+1+log_nw]; | ||||
|             ff[_bit_idx*(1+_word_idx)].q = data[_word_idx].d[_bit_idx]; | ||||
|             ff[_bit_idx*(1+_word_idx)].reset_B = reset_mem_BXX[_bit_idx*(1+_word_idx)]; | ||||
|             ff[_bit_idx*(1+_word_idx)].vdd = supply.vdd; | ||||
|             ff[_bit_idx*(1+_word_idx)].vss = supply.vss; | ||||
|             clock_buffer[_word_idx].out[_bit_idx] = _clock_buffer_out[_bit_idx*(1+_word_idx)]; | ||||
|             // ff[_bit_idx*(1+_word_idx)].clk = _clock_buffer_out[_bit_idx*(1+_word_idx)]; | ||||
|             // ff[_bit_idx*(1+_word_idx)].d = in.d.d[_bit_idx+1+log_nw].t; | ||||
|             // ff[_bit_idx*(1+_word_idx)].q = data[_word_idx].d[_bit_idx]; | ||||
|             // ff[_bit_idx*(1+_word_idx)].reset_B = _reset_mem_BXX[_bit_idx*(1+_word_idx)]; | ||||
|             // ff[_bit_idx*(1+_word_idx)].vdd = supply.vdd; | ||||
|             // ff[_bit_idx*(1+_word_idx)].vss = supply.vss; | ||||
|         ) | ||||
|     ) | ||||
| } | ||||
|   | ||||
							
								
								
									
										298
									
								
								test/unit_tests/register_write/run/prsim.out
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										298
									
								
								test/unit_tests/register_write/run/prsim.out
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -30,13 +30,13 @@ import "../../dataflow_neuro/registers.act"; | ||||
| import globals; | ||||
|  | ||||
| open tmpl::dataflow_neuro; | ||||
|  | ||||
| defproc register_test (avMx1of2<1+2+2> in; d1of<2> data[2<<2]){ | ||||
| // 2 bits encoder, 2 bits long words, 2 delays???? | ||||
| defproc register_test (avMx1of2<1+2+2> in; d1of<2> data[2<<2]; bool? dly_cfg[2]){ | ||||
|  | ||||
|     register_rw<2,2,2> registers(.in=in,.data = data); | ||||
|     //Low active Reset  | ||||
|     bool _reset_B;  | ||||
|     power supply; | ||||
|     power _supply; | ||||
|     prs { | ||||
|     	Reset => _reset_B- | ||||
|     } | ||||
| @@ -44,7 +44,8 @@ defproc register_test (avMx1of2<1+2+2> in; d1of<2> data[2<<2]){ | ||||
|     _supply.vss = GND; | ||||
|     _supply.vdd = Vdd; | ||||
|     registers.reset_B = _reset_B; | ||||
|     registers.reset_B_mem = _reset_B; | ||||
|     registers.reset_mem_B = _reset_B; | ||||
|     registers.dly_cfg = dly_cfg; | ||||
|      | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -1,8 +1,43 @@ | ||||
| watchall | ||||
| system "echo '[0] start test'" | ||||
| set Reset 1 | ||||
| set-qdi-channel-neutral "t.in" 2 | ||||
|  | ||||
|  | ||||
| set-qdi-channel-neutral "t.in" 5 | ||||
| set t.data[0].d[0] 0 | ||||
| set t.data[0].d[1] 0 | ||||
| set t.data[1].d[0] 0 | ||||
| set t.data[1].d[1] 0 | ||||
| cycle | ||||
| status X | ||||
| mode run | ||||
| assert-qdi-channel-neutral "t.in" 5 | ||||
| assert t.data[0].d[0] 0 | ||||
| assert t.data[0].d[1] 0 | ||||
| assert t.data[1].d[0] 0 | ||||
| assert t.data[1].d[1] 0 | ||||
| set Reset 0 | ||||
| cycle | ||||
| system "echo '[1] reset completed'" | ||||
| # Set delay config lines | ||||
| set t.dly_cfg[0] 1 | ||||
| set t.dly_cfg[1] 1 | ||||
| cycle | ||||
| assert-qdi-channel-neutral "t.in" 5 | ||||
| system "echo '[2] delay line set'" | ||||
| set-qdi-channel-valid "t.in" 5 3 | ||||
| cycle | ||||
| assert-qdi-channel-valid "t.in" 5 3 | ||||
| assert t.registers._clock 1 | ||||
| assert t.registers._out_encoder[0] 1 | ||||
| assert t.registers._out_encoder[1] 0 | ||||
| assert t.registers._out_encoder[2] 0 | ||||
| assert t.registers._out_encoder[3] 0 | ||||
| set-qdi-channel-neutral "t.in" 5 | ||||
| cycle | ||||
| assert t.registers._clock 0 | ||||
| assert t.registers.ff[0].q 1 | ||||
| assert t.registers.ff[1].q 1 | ||||
| system "echo '[3] clock checked'" | ||||
|  | ||||
|  | ||||
|   | ||||
							
								
								
									
										50
									
								
								test/unit_tests/vtree_5/run/prsim.out
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								test/unit_tests/vtree_5/run/prsim.out
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| t._in.d[1].t t.vtree_test.ct.in[2] t._in.d[2].f t._in.d[3].t t._in.d[3].f t.vtree_test.ct.C3Els[0]._y t.vtree_test.ct.in[0] t._in.d[4].f t._in.d[0].f t._in.d[4].t t._in.d[0].t t.out t._in.d[1].f t._in.d[2].t t.vtree_test.ct.in[3] t.vtree_test.ct.tmp[6] t.vtree_test.OR2_tf[3]._y t.vtree_test.ct.in[1] t.vtree_test.ct.in[4] t.vtree_test.OR2_tf[4]._y t.vtree_test.OR2_tf[0]._y t.vtree_test.ct.C2Els[1]._y t.vtree_test.ct.C2Els[0]._y t.vtree_test.ct.tmp[5] t.vtree_test.OR2_tf[2]._y t.vtree_test.OR2_tf[1]._y  | ||||
| [0] starting test true high | ||||
| 	         0 t._in.d[0].f : 0 | ||||
| 	         0 t._in.d[4].t : 0 | ||||
| 	         0 t._in.d[4].f : 0 | ||||
| 	         0 t._in.d[3].t : 0 | ||||
| 	         0 t._in.d[1].f : 0 | ||||
| 	         0 t._in.d[3].f : 0 | ||||
| 	         0 t._in.d[2].t : 0 | ||||
| 	         0 t._in.d[0].t : 0 | ||||
| 	         0 t._in.d[2].f : 0 | ||||
| 	         0 t._in.d[1].t : 0 | ||||
| 	         1 t.vtree_test.OR2_tf[4]._y : 1  [by t._in.d[4].f:=0] | ||||
| 	         2 t.vtree_test.OR2_tf[2]._y : 1  [by t._in.d[2].f:=0] | ||||
| 	       116 t.vtree_test.ct.in[2] : 0  [by t.vtree_test.OR2_tf[2]._y:=1] | ||||
| 	      1138 t.vtree_test.ct.in[4] : 0  [by t.vtree_test.OR2_tf[4]._y:=1] | ||||
| 	      4753 t.vtree_test.OR2_tf[1]._y : 1  [by t._in.d[1].t:=0] | ||||
| 	      7092 t.vtree_test.OR2_tf[3]._y : 1  [by t._in.d[3].f:=0] | ||||
| 	      8818 t.vtree_test.ct.in[3] : 0  [by t.vtree_test.OR2_tf[3]._y:=1] | ||||
| 	      8857 t.vtree_test.ct.C3Els[0]._y : 1  [by t.vtree_test.ct.in[3]:=0] | ||||
| 	      8872 t.vtree_test.ct.tmp[6] : 0  [by t.vtree_test.ct.C3Els[0]._y:=1] | ||||
| 	     10467 t.vtree_test.OR2_tf[0]._y : 1  [by t._in.d[0].t:=0] | ||||
| 	     10958 t.vtree_test.ct.in[0] : 0  [by t.vtree_test.OR2_tf[0]._y:=1] | ||||
| 	     70119 t.vtree_test.ct.in[1] : 0  [by t.vtree_test.OR2_tf[1]._y:=1] | ||||
| 	     70132 t.vtree_test.ct.C2Els[0]._y : 1  [by t.vtree_test.ct.in[1]:=0] | ||||
| 	     70172 t.vtree_test.ct.tmp[5] : 0  [by t.vtree_test.ct.C2Els[0]._y:=1] | ||||
| 	     70587 t.vtree_test.ct.C2Els[1]._y : 1  [by t.vtree_test.ct.tmp[5]:=0] | ||||
| 	     70607 t.out : 0  [by t.vtree_test.ct.C2Els[1]._y:=1] | ||||
| 	     70607 t._in.d[0].t : 1 | ||||
| 	     70607 t._in.d[4].f : 1 | ||||
| 	     70607 t._in.d[2].f : 1 | ||||
| 	     70607 t._in.d[1].t : 1 | ||||
| 	     70607 t._in.d[3].f : 1 | ||||
| 	     70623 t.vtree_test.OR2_tf[2]._y : 0  [by t._in.d[2].f:=1] | ||||
| 	     70627 t.vtree_test.ct.in[2] : 1  [by t.vtree_test.OR2_tf[2]._y:=0] | ||||
| 	     70654 t.vtree_test.OR2_tf[4]._y : 0  [by t._in.d[4].f:=1] | ||||
| 	     76668 t.vtree_test.OR2_tf[0]._y : 0  [by t._in.d[0].t:=1] | ||||
| 	     76683 t.vtree_test.ct.in[0] : 1  [by t.vtree_test.OR2_tf[0]._y:=0] | ||||
| 	     79783 t.vtree_test.ct.in[4] : 1  [by t.vtree_test.OR2_tf[4]._y:=0] | ||||
| 	     84331 t.vtree_test.OR2_tf[3]._y : 0  [by t._in.d[3].f:=1] | ||||
| 	    114705 t.vtree_test.OR2_tf[1]._y : 0  [by t._in.d[1].t:=1] | ||||
| 	    127579 t.vtree_test.ct.in[3] : 1  [by t.vtree_test.OR2_tf[3]._y:=0] | ||||
| 	    127634 t.vtree_test.ct.C3Els[0]._y : 0  [by t.vtree_test.ct.in[3]:=1] | ||||
| 	    151636 t.vtree_test.ct.in[1] : 1  [by t.vtree_test.OR2_tf[1]._y:=0] | ||||
| 	    179287 t.vtree_test.ct.tmp[6] : 1  [by t.vtree_test.ct.C3Els[0]._y:=0] | ||||
| 	    181416 t.vtree_test.ct.C2Els[0]._y : 0  [by t.vtree_test.ct.in[1]:=1] | ||||
| 	    195265 t.vtree_test.ct.tmp[5] : 1  [by t.vtree_test.ct.C2Els[0]._y:=0] | ||||
| 	    220077 t.vtree_test.ct.C2Els[1]._y : 0  [by t.vtree_test.ct.tmp[5]:=1] | ||||
| 	    234420 t.out : 1  [by t.vtree_test.ct.C2Els[1]._y:=0] | ||||
| [1] cleaning input | ||||
							
								
								
									
										218
									
								
								test/unit_tests/vtree_5/run/test.prs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										218
									
								
								test/unit_tests/vtree_5/run/test.prs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,218 @@ | ||||
| = "GND" "GND" | ||||
| = "Vdd" "Vdd" | ||||
| = "Reset" "Reset" | ||||
| ~"t.vtree_test.ct.C2Els[0].c1"&~"t.vtree_test.ct.C2Els[0].c2"->"t.vtree_test.ct.C2Els[0]._y"+ | ||||
| "t.vtree_test.ct.C2Els[0].c1"&"t.vtree_test.ct.C2Els[0].c2"->"t.vtree_test.ct.C2Els[0]._y"- | ||||
| "t.vtree_test.ct.C2Els[0]._y"->"t.vtree_test.ct.C2Els[0].y"- | ||||
| ~("t.vtree_test.ct.C2Els[0]._y")->"t.vtree_test.ct.C2Els[0].y"+ | ||||
| ~"t.vtree_test.ct.C2Els[1].c1"&~"t.vtree_test.ct.C2Els[1].c2"->"t.vtree_test.ct.C2Els[1]._y"+ | ||||
| "t.vtree_test.ct.C2Els[1].c1"&"t.vtree_test.ct.C2Els[1].c2"->"t.vtree_test.ct.C2Els[1]._y"- | ||||
| "t.vtree_test.ct.C2Els[1]._y"->"t.vtree_test.ct.C2Els[1].y"- | ||||
| ~("t.vtree_test.ct.C2Els[1]._y")->"t.vtree_test.ct.C2Els[1].y"+ | ||||
| ~"t.vtree_test.ct.C3Els[0].c1"&~"t.vtree_test.ct.C3Els[0].c2"&~"t.vtree_test.ct.C3Els[0].c3"->"t.vtree_test.ct.C3Els[0]._y"+ | ||||
| "t.vtree_test.ct.C3Els[0].c1"&"t.vtree_test.ct.C3Els[0].c2"&"t.vtree_test.ct.C3Els[0].c3"->"t.vtree_test.ct.C3Els[0]._y"- | ||||
| "t.vtree_test.ct.C3Els[0]._y"->"t.vtree_test.ct.C3Els[0].y"- | ||||
| ~("t.vtree_test.ct.C3Els[0]._y")->"t.vtree_test.ct.C3Els[0].y"+ | ||||
| = "t.vtree_test.ct.tmp[5]" "t.vtree_test.ct.C2Els[1].c1" | ||||
| = "t.vtree_test.ct.tmp[5]" "t.vtree_test.ct.C2Els[0].y" | ||||
| = "t.vtree_test.ct.tmp[6]" "t.vtree_test.ct.C2Els[1].c2" | ||||
| = "t.vtree_test.ct.tmp[6]" "t.vtree_test.ct.C3Els[0].y" | ||||
| = "t.vtree_test.ct.supply.vdd" "t.vtree_test.ct.C3Els[0].vdd" | ||||
| = "t.vtree_test.ct.supply.vdd" "t.vtree_test.ct.C2Els[1].vdd" | ||||
| = "t.vtree_test.ct.supply.vdd" "t.vtree_test.ct.C2Els[0].vdd" | ||||
| = "t.vtree_test.ct.supply.vss" "t.vtree_test.ct.C3Els[0].vss" | ||||
| = "t.vtree_test.ct.supply.vss" "t.vtree_test.ct.C2Els[1].vss" | ||||
| = "t.vtree_test.ct.supply.vss" "t.vtree_test.ct.C2Els[0].vss" | ||||
| = "t.vtree_test.ct.in[0]" "t.vtree_test.ct.C2Els[0].c1" | ||||
| = "t.vtree_test.ct.in[0]" "t.vtree_test.ct.tmp[0]" | ||||
| = "t.vtree_test.ct.in[1]" "t.vtree_test.ct.C2Els[0].c2" | ||||
| = "t.vtree_test.ct.in[1]" "t.vtree_test.ct.tmp[1]" | ||||
| = "t.vtree_test.ct.in[2]" "t.vtree_test.ct.C3Els[0].c1" | ||||
| = "t.vtree_test.ct.in[2]" "t.vtree_test.ct.tmp[2]" | ||||
| = "t.vtree_test.ct.in[3]" "t.vtree_test.ct.C3Els[0].c2" | ||||
| = "t.vtree_test.ct.in[3]" "t.vtree_test.ct.tmp[3]" | ||||
| = "t.vtree_test.ct.in[4]" "t.vtree_test.ct.C3Els[0].c3" | ||||
| = "t.vtree_test.ct.in[4]" "t.vtree_test.ct.tmp[4]" | ||||
| = "t.vtree_test.ct.out" "t.vtree_test.ct.C2Els[1].y" | ||||
| = "t.vtree_test.ct.out" "t.vtree_test.ct.tmp[7]" | ||||
| = "t.vtree_test.ct.in[0]" "t.vtree_test.OR2_tf[0].y" | ||||
| = "t.vtree_test.ct.in[1]" "t.vtree_test.OR2_tf[1].y" | ||||
| = "t.vtree_test.ct.in[2]" "t.vtree_test.OR2_tf[2].y" | ||||
| = "t.vtree_test.ct.in[3]" "t.vtree_test.OR2_tf[3].y" | ||||
| = "t.vtree_test.ct.in[4]" "t.vtree_test.OR2_tf[4].y" | ||||
| "t.vtree_test.OR2_tf[0].a"|"t.vtree_test.OR2_tf[0].b"->"t.vtree_test.OR2_tf[0]._y"- | ||||
| ~("t.vtree_test.OR2_tf[0].a"|"t.vtree_test.OR2_tf[0].b")->"t.vtree_test.OR2_tf[0]._y"+ | ||||
| "t.vtree_test.OR2_tf[0]._y"->"t.vtree_test.OR2_tf[0].y"- | ||||
| ~("t.vtree_test.OR2_tf[0]._y")->"t.vtree_test.OR2_tf[0].y"+ | ||||
| "t.vtree_test.OR2_tf[1].a"|"t.vtree_test.OR2_tf[1].b"->"t.vtree_test.OR2_tf[1]._y"- | ||||
| ~("t.vtree_test.OR2_tf[1].a"|"t.vtree_test.OR2_tf[1].b")->"t.vtree_test.OR2_tf[1]._y"+ | ||||
| "t.vtree_test.OR2_tf[1]._y"->"t.vtree_test.OR2_tf[1].y"- | ||||
| ~("t.vtree_test.OR2_tf[1]._y")->"t.vtree_test.OR2_tf[1].y"+ | ||||
| "t.vtree_test.OR2_tf[2].a"|"t.vtree_test.OR2_tf[2].b"->"t.vtree_test.OR2_tf[2]._y"- | ||||
| ~("t.vtree_test.OR2_tf[2].a"|"t.vtree_test.OR2_tf[2].b")->"t.vtree_test.OR2_tf[2]._y"+ | ||||
| "t.vtree_test.OR2_tf[2]._y"->"t.vtree_test.OR2_tf[2].y"- | ||||
| ~("t.vtree_test.OR2_tf[2]._y")->"t.vtree_test.OR2_tf[2].y"+ | ||||
| "t.vtree_test.OR2_tf[3].a"|"t.vtree_test.OR2_tf[3].b"->"t.vtree_test.OR2_tf[3]._y"- | ||||
| ~("t.vtree_test.OR2_tf[3].a"|"t.vtree_test.OR2_tf[3].b")->"t.vtree_test.OR2_tf[3]._y"+ | ||||
| "t.vtree_test.OR2_tf[3]._y"->"t.vtree_test.OR2_tf[3].y"- | ||||
| ~("t.vtree_test.OR2_tf[3]._y")->"t.vtree_test.OR2_tf[3].y"+ | ||||
| "t.vtree_test.OR2_tf[4].a"|"t.vtree_test.OR2_tf[4].b"->"t.vtree_test.OR2_tf[4]._y"- | ||||
| ~("t.vtree_test.OR2_tf[4].a"|"t.vtree_test.OR2_tf[4].b")->"t.vtree_test.OR2_tf[4]._y"+ | ||||
| "t.vtree_test.OR2_tf[4]._y"->"t.vtree_test.OR2_tf[4].y"- | ||||
| ~("t.vtree_test.OR2_tf[4]._y")->"t.vtree_test.OR2_tf[4].y"+ | ||||
| = "t.vtree_test.supply.vss" "t.vtree_test.ct.supply.vss" | ||||
| = "t.vtree_test.supply.vdd" "t.vtree_test.ct.supply.vdd" | ||||
| = "t.vtree_test.supply.vdd" "t.vtree_test.OR2_tf[4].vdd" | ||||
| = "t.vtree_test.supply.vdd" "t.vtree_test.OR2_tf[3].vdd" | ||||
| = "t.vtree_test.supply.vdd" "t.vtree_test.OR2_tf[2].vdd" | ||||
| = "t.vtree_test.supply.vdd" "t.vtree_test.OR2_tf[1].vdd" | ||||
| = "t.vtree_test.supply.vdd" "t.vtree_test.OR2_tf[0].vdd" | ||||
| = "t.vtree_test.supply.vss" "t.vtree_test.OR2_tf[4].vss" | ||||
| = "t.vtree_test.supply.vss" "t.vtree_test.OR2_tf[3].vss" | ||||
| = "t.vtree_test.supply.vss" "t.vtree_test.OR2_tf[2].vss" | ||||
| = "t.vtree_test.supply.vss" "t.vtree_test.OR2_tf[1].vss" | ||||
| = "t.vtree_test.supply.vss" "t.vtree_test.OR2_tf[0].vss" | ||||
| = "t.vtree_test.out" "t.vtree_test.ct.out" | ||||
| = "t.vtree_test.in.d[0].d[0]" "t.vtree_test.in.d[0].f" | ||||
| = "t.vtree_test.in.d[0].d[1]" "t.vtree_test.in.d[0].t" | ||||
| = "t.vtree_test.in.d[1].d[0]" "t.vtree_test.in.d[1].f" | ||||
| = "t.vtree_test.in.d[1].d[1]" "t.vtree_test.in.d[1].t" | ||||
| = "t.vtree_test.in.d[2].d[0]" "t.vtree_test.in.d[2].f" | ||||
| = "t.vtree_test.in.d[2].d[1]" "t.vtree_test.in.d[2].t" | ||||
| = "t.vtree_test.in.d[3].d[0]" "t.vtree_test.in.d[3].f" | ||||
| = "t.vtree_test.in.d[3].d[1]" "t.vtree_test.in.d[3].t" | ||||
| = "t.vtree_test.in.d[4].d[0]" "t.vtree_test.in.d[4].f" | ||||
| = "t.vtree_test.in.d[4].d[1]" "t.vtree_test.in.d[4].t" | ||||
| = "t.vtree_test.in.d[4].d[0]" "t.vtree_test.in.d[4].f" | ||||
| = "t.vtree_test.in.d[4].d[1]" "t.vtree_test.in.d[4].t" | ||||
| = "t.vtree_test.in.d[3].d[0]" "t.vtree_test.in.d[3].f" | ||||
| = "t.vtree_test.in.d[3].d[1]" "t.vtree_test.in.d[3].t" | ||||
| = "t.vtree_test.in.d[2].d[0]" "t.vtree_test.in.d[2].f" | ||||
| = "t.vtree_test.in.d[2].d[1]" "t.vtree_test.in.d[2].t" | ||||
| = "t.vtree_test.in.d[1].d[0]" "t.vtree_test.in.d[1].f" | ||||
| = "t.vtree_test.in.d[1].d[1]" "t.vtree_test.in.d[1].t" | ||||
| = "t.vtree_test.in.d[0].d[0]" "t.vtree_test.in.d[0].f" | ||||
| = "t.vtree_test.in.d[0].d[1]" "t.vtree_test.in.d[0].t" | ||||
| = "t.vtree_test.in.d[4].d[0]" "t.vtree_test.OR2_tf[4].b" | ||||
| = "t.vtree_test.in.d[4].d[0]" "t.vtree_test.in.d[4].f" | ||||
| = "t.vtree_test.in.d[4].d[1]" "t.vtree_test.OR2_tf[4].a" | ||||
| = "t.vtree_test.in.d[4].d[1]" "t.vtree_test.in.d[4].t" | ||||
| = "t.vtree_test.in.d[3].d[0]" "t.vtree_test.OR2_tf[3].b" | ||||
| = "t.vtree_test.in.d[3].d[0]" "t.vtree_test.in.d[3].f" | ||||
| = "t.vtree_test.in.d[3].d[1]" "t.vtree_test.OR2_tf[3].a" | ||||
| = "t.vtree_test.in.d[3].d[1]" "t.vtree_test.in.d[3].t" | ||||
| = "t.vtree_test.in.d[2].d[0]" "t.vtree_test.OR2_tf[2].b" | ||||
| = "t.vtree_test.in.d[2].d[0]" "t.vtree_test.in.d[2].f" | ||||
| = "t.vtree_test.in.d[2].d[1]" "t.vtree_test.OR2_tf[2].a" | ||||
| = "t.vtree_test.in.d[2].d[1]" "t.vtree_test.in.d[2].t" | ||||
| = "t.vtree_test.in.d[1].d[0]" "t.vtree_test.OR2_tf[1].b" | ||||
| = "t.vtree_test.in.d[1].d[0]" "t.vtree_test.in.d[1].f" | ||||
| = "t.vtree_test.in.d[1].d[1]" "t.vtree_test.OR2_tf[1].a" | ||||
| = "t.vtree_test.in.d[1].d[1]" "t.vtree_test.in.d[1].t" | ||||
| = "t.vtree_test.in.d[0].d[0]" "t.vtree_test.OR2_tf[0].b" | ||||
| = "t.vtree_test.in.d[0].d[0]" "t.vtree_test.in.d[0].f" | ||||
| = "t.vtree_test.in.d[0].d[1]" "t.vtree_test.OR2_tf[0].a" | ||||
| = "t.vtree_test.in.d[0].d[1]" "t.vtree_test.in.d[0].t" | ||||
| = "Vdd" "t.vtree_test.supply.vdd" | ||||
| = "GND" "t.vtree_test.supply.vss" | ||||
| = "t._in.d[0].d[0]" "t._in.d[0].f" | ||||
| = "t._in.d[0].d[1]" "t._in.d[0].t" | ||||
| = "t._in.d[1].d[0]" "t._in.d[1].f" | ||||
| = "t._in.d[1].d[1]" "t._in.d[1].t" | ||||
| = "t._in.d[2].d[0]" "t._in.d[2].f" | ||||
| = "t._in.d[2].d[1]" "t._in.d[2].t" | ||||
| = "t._in.d[3].d[0]" "t._in.d[3].f" | ||||
| = "t._in.d[3].d[1]" "t._in.d[3].t" | ||||
| = "t._in.d[4].d[0]" "t._in.d[4].f" | ||||
| = "t._in.d[4].d[1]" "t._in.d[4].t" | ||||
| = "t._in.d[4].d[0]" "t._in.d[4].f" | ||||
| = "t._in.d[4].d[1]" "t._in.d[4].t" | ||||
| = "t._in.d[3].d[0]" "t._in.d[3].f" | ||||
| = "t._in.d[3].d[1]" "t._in.d[3].t" | ||||
| = "t._in.d[2].d[0]" "t._in.d[2].f" | ||||
| = "t._in.d[2].d[1]" "t._in.d[2].t" | ||||
| = "t._in.d[1].d[0]" "t._in.d[1].f" | ||||
| = "t._in.d[1].d[1]" "t._in.d[1].t" | ||||
| = "t._in.d[0].d[0]" "t._in.d[0].f" | ||||
| = "t._in.d[0].d[1]" "t._in.d[0].t" | ||||
| = "t._in.d[0].f" "t.vtree_test.in.d[0].f" | ||||
| = "t._in.d[0].t" "t.vtree_test.in.d[0].t" | ||||
| = "t._in.d[0].d[0]" "t.vtree_test.in.d[0].d[0]" | ||||
| = "t._in.d[0].d[1]" "t.vtree_test.in.d[0].d[1]" | ||||
| = "t._in.d[1].f" "t.vtree_test.in.d[1].f" | ||||
| = "t._in.d[1].t" "t.vtree_test.in.d[1].t" | ||||
| = "t._in.d[1].d[0]" "t.vtree_test.in.d[1].d[0]" | ||||
| = "t._in.d[1].d[1]" "t.vtree_test.in.d[1].d[1]" | ||||
| = "t._in.d[2].f" "t.vtree_test.in.d[2].f" | ||||
| = "t._in.d[2].t" "t.vtree_test.in.d[2].t" | ||||
| = "t._in.d[2].d[0]" "t.vtree_test.in.d[2].d[0]" | ||||
| = "t._in.d[2].d[1]" "t.vtree_test.in.d[2].d[1]" | ||||
| = "t._in.d[3].f" "t.vtree_test.in.d[3].f" | ||||
| = "t._in.d[3].t" "t.vtree_test.in.d[3].t" | ||||
| = "t._in.d[3].d[0]" "t.vtree_test.in.d[3].d[0]" | ||||
| = "t._in.d[3].d[1]" "t.vtree_test.in.d[3].d[1]" | ||||
| = "t._in.d[4].f" "t.vtree_test.in.d[4].f" | ||||
| = "t._in.d[4].t" "t.vtree_test.in.d[4].t" | ||||
| = "t._in.d[4].d[0]" "t.vtree_test.in.d[4].d[0]" | ||||
| = "t._in.d[4].d[1]" "t.vtree_test.in.d[4].d[1]" | ||||
| = "t.out" "t.vtree_test.out" | ||||
| = "t.in.d.d[0].d[0]" "t.in.d.d[0].f" | ||||
| = "t.in.d.d[0].d[1]" "t.in.d.d[0].t" | ||||
| = "t.in.d.d[1].d[0]" "t.in.d.d[1].f" | ||||
| = "t.in.d.d[1].d[1]" "t.in.d.d[1].t" | ||||
| = "t.in.d.d[2].d[0]" "t.in.d.d[2].f" | ||||
| = "t.in.d.d[2].d[1]" "t.in.d.d[2].t" | ||||
| = "t.in.d.d[3].d[0]" "t.in.d.d[3].f" | ||||
| = "t.in.d.d[3].d[1]" "t.in.d.d[3].t" | ||||
| = "t.in.d.d[4].d[0]" "t.in.d.d[4].f" | ||||
| = "t.in.d.d[4].d[1]" "t.in.d.d[4].t" | ||||
| = "t.in.d.d[4].d[0]" "t.in.d.d[4].f" | ||||
| = "t.in.d.d[4].d[1]" "t.in.d.d[4].t" | ||||
| = "t.in.d.d[3].d[0]" "t.in.d.d[3].f" | ||||
| = "t.in.d.d[3].d[1]" "t.in.d.d[3].t" | ||||
| = "t.in.d.d[2].d[0]" "t.in.d.d[2].f" | ||||
| = "t.in.d.d[2].d[1]" "t.in.d.d[2].t" | ||||
| = "t.in.d.d[1].d[0]" "t.in.d.d[1].f" | ||||
| = "t.in.d.d[1].d[1]" "t.in.d.d[1].t" | ||||
| = "t.in.d.d[0].d[0]" "t.in.d.d[0].f" | ||||
| = "t.in.d.d[0].d[1]" "t.in.d.d[0].t" | ||||
| = "t.in.d.d[4].d[0]" "t.in.d.d[4].f" | ||||
| = "t.in.d.d[4].d[1]" "t.in.d.d[4].t" | ||||
| = "t.in.d.d[3].d[0]" "t.in.d.d[3].f" | ||||
| = "t.in.d.d[3].d[1]" "t.in.d.d[3].t" | ||||
| = "t.in.d.d[2].d[0]" "t.in.d.d[2].f" | ||||
| = "t.in.d.d[2].d[1]" "t.in.d.d[2].t" | ||||
| = "t.in.d.d[1].d[0]" "t.in.d.d[1].f" | ||||
| = "t.in.d.d[1].d[1]" "t.in.d.d[1].t" | ||||
| = "t.in.d.d[0].d[0]" "t.in.d.d[0].f" | ||||
| = "t.in.d.d[0].d[1]" "t.in.d.d[0].t" | ||||
| = "t.in.d.d[0].f" "t._in.d[0].f" | ||||
| = "t.in.d.d[0].t" "t._in.d[0].t" | ||||
| = "t.in.d.d[0].d[0]" "t._in.d[0].d[0]" | ||||
| = "t.in.d.d[0].d[1]" "t._in.d[0].d[1]" | ||||
| = "t.in.d.d[1].f" "t._in.d[1].f" | ||||
| = "t.in.d.d[1].t" "t._in.d[1].t" | ||||
| = "t.in.d.d[1].d[0]" "t._in.d[1].d[0]" | ||||
| = "t.in.d.d[1].d[1]" "t._in.d[1].d[1]" | ||||
| = "t.in.d.d[2].f" "t._in.d[2].f" | ||||
| = "t.in.d.d[2].t" "t._in.d[2].t" | ||||
| = "t.in.d.d[2].d[0]" "t._in.d[2].d[0]" | ||||
| = "t.in.d.d[2].d[1]" "t._in.d[2].d[1]" | ||||
| = "t.in.d.d[3].f" "t._in.d[3].f" | ||||
| = "t.in.d.d[3].t" "t._in.d[3].t" | ||||
| = "t.in.d.d[3].d[0]" "t._in.d[3].d[0]" | ||||
| = "t.in.d.d[3].d[1]" "t._in.d[3].d[1]" | ||||
| = "t.in.d.d[4].f" "t._in.d[4].f" | ||||
| = "t.in.d.d[4].t" "t._in.d[4].t" | ||||
| = "t.in.d.d[4].d[0]" "t._in.d[4].d[0]" | ||||
| = "t.in.d.d[4].d[1]" "t._in.d[4].d[1]" | ||||
| = "t.in.d.d[4].d[0]" "t.in.d.d[4].f" | ||||
| = "t.in.d.d[4].d[1]" "t.in.d.d[4].t" | ||||
| = "t.in.d.d[3].d[0]" "t.in.d.d[3].f" | ||||
| = "t.in.d.d[3].d[1]" "t.in.d.d[3].t" | ||||
| = "t.in.d.d[2].d[0]" "t.in.d.d[2].f" | ||||
| = "t.in.d.d[2].d[1]" "t.in.d.d[2].t" | ||||
| = "t.in.d.d[1].d[0]" "t.in.d.d[1].f" | ||||
| = "t.in.d.d[1].d[1]" "t.in.d.d[1].t" | ||||
| = "t.in.d.d[0].d[0]" "t.in.d.d[0].f" | ||||
| = "t.in.d.d[0].d[1]" "t.in.d.d[0].t" | ||||
							
								
								
									
										49
									
								
								test/unit_tests/vtree_5/test.act
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								test/unit_tests/vtree_5/test.act
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,49 @@ | ||||
| /************************************************************************* | ||||
|  * | ||||
|  *  This file is part of ACT dataflow neuro library. | ||||
|  * It's the testing facility for cell_lib_std.act | ||||
|  * | ||||
|  *  Copyright (c) 2022 University of Groningen - Ole Richter   | ||||
|  *  Copyright (c) 2022 University of Groningen - Hugh Greatorex | ||||
|  *  Copyright (c) 2022 University of Groningen - Michele Mastella | ||||
|  *  Copyright (c) 2022 University of Groningen - Madison Cotteret | ||||
|  * | ||||
|  *  This source describes Open Hardware and is licensed under the CERN-OHL-W v2 or later | ||||
|  * | ||||
|  *  You may redistribute and modify this documentation and make products | ||||
|  *  using it under the terms of the CERN-OHL-W v2 (https:/cern.ch/cern-ohl). | ||||
|  *  This documentation is distributed WITHOUT ANY EXPRESS OR IMPLIED | ||||
|  *  WARRANTY, INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY | ||||
|  *  AND FITNESS FOR A PARTICULAR PURPOSE. Please see the CERN-OHL-W v2 | ||||
|  *  for applicable conditions. | ||||
|  * | ||||
|  *  Source location: https://git.web.rug.nl/bics/actlib_dataflow_neuro | ||||
|  * | ||||
|  *  As per CERN-OHL-W v2 section 4.1, should You produce hardware based on | ||||
|  *  these sources, You must maintain the Source Location visible in its | ||||
|  *  documentation. | ||||
|  * | ||||
|  ************************************************************************** | ||||
|  */ | ||||
|  | ||||
| import "../../dataflow_neuro/cell_lib_async.act"; | ||||
| import "../../dataflow_neuro/cell_lib_std.act"; | ||||
| import "../../dataflow_neuro/treegates.act"; | ||||
| import "../../dataflow_neuro/primitives.act"; | ||||
| import "../../dataflow_neuro/coders.act"; | ||||
| import globals; | ||||
| import std::channel; | ||||
| open std::channel; | ||||
| open tmpl::dataflow_neuro; | ||||
|  | ||||
| defproc vtree_5 (avMx1of2?<5> in; bool! out){ | ||||
|  | ||||
|     Mx1of2?<5> _in; | ||||
|     (i:5:_in.d[i] = in.d.d[i];) | ||||
|     vtree<5> vtree_test(.in=_in, .out=out); | ||||
|     vtree_test.supply.vss = GND; | ||||
|     vtree_test.supply.vdd = Vdd; | ||||
|  | ||||
| } | ||||
|  | ||||
| vtree_5 t; | ||||
							
								
								
									
										11
									
								
								test/unit_tests/vtree_5/test.prsim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								test/unit_tests/vtree_5/test.prsim
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| watchall | ||||
| system "echo '[0] starting test true high'" | ||||
| set-qdi-channel-neutral "t.in" 5 | ||||
| cycle | ||||
| mode run | ||||
| assert t.out 0 | ||||
| set-qdi-channel-valid "t.in" 5 3 | ||||
| cycle | ||||
| mode run | ||||
| assert t.out 1 | ||||
| system "echo '[1] cleaning input'" | ||||
		Reference in New Issue
	
	Block a user