fixed test, changed to simple encoder

This commit is contained in:
alexmadison 2023-11-21 13:35:36 +01:00
parent c1e26267e2
commit 9411dde4aa
1 changed files with 3 additions and 2 deletions

View File

@ -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);