created demultiplexer and tests, not working yet
This commit is contained in:
54
test/unit_tests/demux_qdi2bd_1d/test.act
Normal file
54
test/unit_tests/demux_qdi2bd_1d/test.act
Normal file
@ -0,0 +1,54 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* This file is part of ACT dataflow neuro library.
|
||||
* It's the testing facility for cell_lib_std.act
|
||||
*
|
||||
* Copyright (c) 2024 University of Groningen - Ole Richter
|
||||
* Copyright (c) 2024 University of Groningen - Paolo Gibertini
|
||||
*
|
||||
* 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/coders.act";
|
||||
import "../../dataflow_neuro/primitives.act";
|
||||
import "../../dataflow_neuro/cell_lib_async.act";
|
||||
import "../../dataflow_neuro/cell_lib_std.act";
|
||||
|
||||
|
||||
import globals;
|
||||
import std::data;
|
||||
|
||||
open std::data;
|
||||
|
||||
open tmpl::dataflow_neuro;
|
||||
|
||||
defproc demux_qdi2bd_1d_test (avMx1of2<4> in; rbd<4> out[15]){
|
||||
|
||||
demux_qdi2bd_1d<15, 4> decoder_test(.in=in, .out=out);
|
||||
//Low active Reset
|
||||
bool _reset_B;
|
||||
prs {
|
||||
Reset => _reset_B-
|
||||
}
|
||||
decoder_test.supply.vss = GND;
|
||||
decoder_test.supply.vdd = Vdd;
|
||||
decoder_test.reset_B = _reset_B;
|
||||
|
||||
}
|
||||
|
||||
demux_qdi2bd_1d_test t;
|
73
test/unit_tests/demux_qdi2bd_1d/test.prsim
Normal file
73
test/unit_tests/demux_qdi2bd_1d/test.prsim
Normal file
@ -0,0 +1,73 @@
|
||||
|
||||
set-qdi-channel-neutral "t.in" 4
|
||||
set t.out[0].a 0
|
||||
set t.out[1].a 0
|
||||
set t.out[2].a 0
|
||||
set t.out[3].a 0
|
||||
set t.out[4].a 0
|
||||
set t.out[5].a 0
|
||||
set t.out[6].a 0
|
||||
set t.out[7].a 0
|
||||
set t.out[8].a 0
|
||||
set t.out[9].a 0
|
||||
set t.out[10].a 0
|
||||
set t.out[11].a 0
|
||||
set t.out[12].a 0
|
||||
set t.out[13].a 0
|
||||
set t.out[14].a 0
|
||||
|
||||
cycle
|
||||
system "echo 'reset start'"
|
||||
|
||||
set Reset 0
|
||||
|
||||
cycle
|
||||
system "echo 'reset completed'"
|
||||
status X
|
||||
mode run
|
||||
|
||||
assert-bd-channel-neutral "t.out[0]" 4
|
||||
assert-bd-channel-neutral "t.out[1]" 4
|
||||
assert-bd-channel-neutral "t.out[2]" 4
|
||||
assert-bd-channel-neutral "t.out[3]" 4
|
||||
assert-bd-channel-neutral "t.out[4]" 4
|
||||
assert-bd-channel-neutral "t.out[5]" 4
|
||||
assert-bd-channel-neutral "t.out[6]" 4
|
||||
assert-bd-channel-neutral "t.out[7]" 4
|
||||
assert-bd-channel-neutral "t.out[8]" 4
|
||||
assert-bd-channel-neutral "t.out[9]" 4
|
||||
assert-bd-channel-neutral "t.out[10]" 4
|
||||
assert-bd-channel-neutral "t.out[11]" 4
|
||||
assert-bd-channel-neutral "t.out[12]" 4
|
||||
assert-bd-channel-neutral "t.out[13]" 4
|
||||
assert-bd-channel-neutral "t.out[14]" 4
|
||||
cycle
|
||||
|
||||
set-qdi-channel-valid "t.in" 4 5
|
||||
cycle
|
||||
assert t.in.v 1
|
||||
assert-bd-channel-valid "t.out[0]" 4 0
|
||||
set t.out[5].a 1
|
||||
cycle
|
||||
assert t.in.a 1
|
||||
set-qdi-channel-neutral "t.in" 4
|
||||
cycle
|
||||
assert t.out[5].r 0
|
||||
set t.in.a 0
|
||||
cycle
|
||||
assert-bd-channel-neutral "t.out[0]" 4
|
||||
assert-bd-channel-neutral "t.out[1]" 4
|
||||
assert-bd-channel-neutral "t.out[2]" 4
|
||||
assert-bd-channel-neutral "t.out[3]" 4
|
||||
assert-bd-channel-neutral "t.out[4]" 4
|
||||
assert-bd-channel-neutral "t.out[5]" 4
|
||||
assert-bd-channel-neutral "t.out[6]" 4
|
||||
assert-bd-channel-neutral "t.out[7]" 4
|
||||
assert-bd-channel-neutral "t.out[8]" 4
|
||||
assert-bd-channel-neutral "t.out[9]" 4
|
||||
assert-bd-channel-neutral "t.out[10]" 4
|
||||
assert-bd-channel-neutral "t.out[11]" 4
|
||||
assert-bd-channel-neutral "t.out[12]" 4
|
||||
assert-bd-channel-neutral "t.out[13]" 4
|
||||
assert-bd-channel-neutral "t.out[14]" 4
|
||||
system "echo 'Finished'"
|
Reference in New Issue
Block a user