fixed unit tests with new handshake blocks
This commit is contained in:
parent
9411dde4aa
commit
aa299fb45f
@ -36,7 +36,7 @@ open std::data;
|
||||
|
||||
open tmpl::dataflow_neuro;
|
||||
|
||||
defproc fifo_decoder_neurons_encoder_fifo (avMx1of2<7> in; avMx1of2<7> out; bool? dly_cfg[4], hs_en){
|
||||
defproc fifo_decoder_neurons_encoder_fifo (avMx1of2<7> in; avMx1of2<7> out; bool? dly_cfg[4], hs_en, ack_disable){
|
||||
bool _reset_B;
|
||||
prs {
|
||||
Reset => _reset_B-
|
||||
@ -52,18 +52,35 @@ defproc fifo_decoder_neurons_encoder_fifo (avMx1of2<7> in; avMx1of2<7> out; bool
|
||||
Ny = 1<<NyC;
|
||||
|
||||
fifo<NxC + NyC,5> fifo_pre(.in = in, .reset_B = _reset_B, .supply = supply);
|
||||
decoder_2d_hybrid<NxC,NyC,Nx,Ny,4> decoder(.in = fifo_pre.out, .dly_cfg =dly_cfg, .hs_en = hs_en,
|
||||
.reset_B = _reset_B, .supply = supply);
|
||||
// Pretend that each "synapse" immediately makes its one neuron "spike".
|
||||
// that is, connect the output of each encoder target to the decoder input.
|
||||
nrn_hs_2D_array<Nx,Ny,10> neuron_grid(.reset_B = _reset_B, .supply = supply);
|
||||
(i:Nx*Ny:
|
||||
neuron_grid.in[i].r = decoder.out[i].r;
|
||||
neuron_grid.in[i].a = decoder.out[i].a;
|
||||
)
|
||||
|
||||
encoder2D<NxC,NyC,Nx,Ny,4> encoder(.inx = neuron_grid.outx, .iny = neuron_grid.outy,
|
||||
|
||||
decoder_2d_hybrid<NxC,NyC,Nx,Ny,4> decoder(.in = fifo_pre.out, .dly_cfg =dly_cfg,
|
||||
.hs_en = hs_en, .ack_disable = ack_disable,
|
||||
.reset_B = _reset_B, .supply = supply);
|
||||
|
||||
// // Pretend that each "synapse" immediately makes its one neuron "spike".
|
||||
// // that is, connect the output of each encoder target to the decoder input.
|
||||
// and_grid<Nx, Ny> _and_grid(.inx = decoder.out_req_x, .iny = decoder.out_req_y, .supply = supply);
|
||||
|
||||
// // Attach line end pull ups of decoder
|
||||
// decoder.to_pu = decoder.
|
||||
|
||||
// Dummy synapse handshake circuits, to be removed for innovus
|
||||
decoder_2d_synapse_hs<Nx, Ny> _synapses(
|
||||
.in_req_x = decoder.out_req_x, .in_req_y = decoder.out_req_y,
|
||||
.to_pu = decoder.to_pu,
|
||||
.out_ackB_decoder = decoder.in_ackB_decoder,
|
||||
.supply = supply);
|
||||
|
||||
|
||||
nrn_hs_2d_array<Nx,Ny> neuron_grid(.in =_synapses.synapses,
|
||||
.reset_B = _reset_B, .supply = supply);
|
||||
|
||||
|
||||
encoder2d_simple<NxC,NyC,Nx,Ny,4> encoder(.inx = neuron_grid.outx, .iny = neuron_grid.outy,
|
||||
.to_pd_x = neuron_grid.to_pd_x, .to_pd_y = neuron_grid.to_pd_y,
|
||||
.reset_B = _reset_B, .supply = supply);
|
||||
|
||||
fifo<NxC + NyC,5> fifo_post(.in = encoder.out, .out = out, .reset_B = _reset_B, .supply = supply);
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ set e.dly_cfg[1] 0
|
||||
set e.dly_cfg[2] 0
|
||||
set e.dly_cfg[3] 0
|
||||
set e.hs_en 1
|
||||
|
||||
set e.ack_disable 0
|
||||
|
||||
|
||||
set e.out.a 0
|
||||
|
Loading…
Reference in New Issue
Block a user