fixed demux bit 7 test and added note to primitives

This commit is contained in:
alexmadison 2023-11-21 09:35:28 +01:00
parent 822cb58d2c
commit 6eb91b72e0
2 changed files with 5 additions and 4 deletions

View File

@ -863,7 +863,8 @@ defproc slice_data(avMx1of2<N> in; avMx1of2<std::min(N1,N)-std::max(N0,0)> out;
} }
// this is a wrapper for the demux, such that the condition bit is absorbed into the data
// and demux msb is just defaulting it to the msb
export template<pint N; pint CONDITION_BIT> export template<pint N; pint CONDITION_BIT>
defproc demux_bit (avMx1of2<N+1> in; avMx1of2<N> out1; avMx1of2<N> out2; bool? reset_B; power supply) defproc demux_bit (avMx1of2<N+1> in; avMx1of2<N> out1; avMx1of2<N> out2; bool? reset_B; power supply)
{ {

View File

@ -22,7 +22,7 @@ cycle
system "echo 'Output neutral checked'" system "echo 'Output neutral checked'"
set-qdi-channel-valid "my_demux.in" 8 255 set-qdi-channel-valid "my_demux.in" 8 254
cycle cycle
assert my_demux.in.v 1 assert my_demux.in.v 1
assert my_demux.in.a 0 assert my_demux.in.a 0
@ -59,12 +59,12 @@ set my_demux.out2.a 0
set my_demux.out2.v 0 set my_demux.out2.v 0
cycle cycle
set-qdi-channel-valid "my_demux.in" 8 100 set-qdi-channel-valid "my_demux.in" 8 101
cycle cycle
assert my_demux.in.v 1 assert my_demux.in.v 1
assert my_demux.in.a 0 assert my_demux.in.a 0
assert-qdi-channel-valid "my_demux.out2" 7 100 assert-qdi-channel-valid "my_demux.out2" 7 50
set my_demux.out2.v 1 set my_demux.out2.v 1
cycle cycle
assert my_demux.in.a 1 assert my_demux.in.a 1