Compare commits
3 Commits
1aeb37f976
...
aa299fb45f
Author | SHA1 | Date | |
---|---|---|---|
|
aa299fb45f | ||
|
9411dde4aa | ||
|
c1e26267e2 |
@ -57,15 +57,17 @@ defproc fifo_decoder_neurons_encoder_fifo (avMx1of2<7> in; avMx1of2<7> out; bool
|
||||
and_grid<Nx, Ny> _and_grid(.inx = decoder.outx, .iny = decoder.outy, .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);
|
||||
nrn_hs_2d_array<Nx,Ny> neuron_grid(.reset_B = _reset_B, .supply = supply);
|
||||
(i:Nx*Ny:
|
||||
// Connect the output bool to the input req of each neuron handshaker
|
||||
// Leave ack dangling.
|
||||
neuron_grid.in[i].r = _and_grid.out[i];
|
||||
)
|
||||
|
||||
encoder2D<NxC,NyC,Nx,Ny,4> encoder(.inx = neuron_grid.outx, .iny = neuron_grid.outy,
|
||||
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);
|
||||
|
||||
}
|
||||
|
@ -14,9 +14,29 @@ set e.dly_cfg[5] 1
|
||||
|
||||
cycle
|
||||
|
||||
# assert e.decoder.outx[0] 0
|
||||
# assert e.neuron_grid.outx[0].r 0
|
||||
|
||||
|
||||
# assert e.encoder.pd_x[0].inv.y 1
|
||||
|
||||
# assert e.encoder.pd_x[0].pull_downR.n1 1
|
||||
# assert e.encoder.pd_x[0].pull_downR.n2 1
|
||||
# assert e.encoder.pd_x[0].pull_downR.y 0
|
||||
|
||||
# assert e.neuron_grid.neurons[0].pu_x.p1 1
|
||||
# assert e.neuron_grid.neurons[0].pu_x.p2 1
|
||||
# assert e.neuron_grid.neurons[0].pu_x.p3 1
|
||||
|
||||
# assert e.encoder.Xarb.in[0].a 0
|
||||
|
||||
|
||||
|
||||
mode run
|
||||
system "echo '[] Set reset 0'"
|
||||
system "echo '[] Asserting decoder req 0 0'"
|
||||
|
||||
|
||||
status X
|
||||
set Reset 0
|
||||
cycle
|
||||
|
@ -55,13 +55,14 @@ defproc fifo_decoder_neurons_encoder_fifo (avMx1of2<7> in; avMx1of2<7> out){
|
||||
decoder_2d_hs<NxC,NyC,Nx,Ny> decoder(.in = fifo_pre.out, .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);
|
||||
nrn_hs_2d_array<Nx,Ny> 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,
|
||||
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);
|
||||
|
||||
|
@ -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