mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 13:18:56 +00:00
Initialization support for all iCE40 bram modes
This commit is contained in:
parent
b4d7a590e8
commit
752851954b
8 changed files with 65 additions and 28 deletions
|
@ -5,13 +5,8 @@ set -ex
|
|||
for abits in 7 8 9 10 11 12; do
|
||||
for dbits in 2 4 8 16 24 32; do
|
||||
id="test_bram_${abits}_${dbits}"
|
||||
if [ $((RANDOM % 2)) -eq 0 ]; then
|
||||
iadr=0
|
||||
idat=0
|
||||
else
|
||||
iadr=$((RANDOM % (1 << abits)))
|
||||
idat=$((RANDOM % (1 << dbits)))
|
||||
fi
|
||||
iadr=$((RANDOM % (1 << abits)))
|
||||
idat=$((RANDOM % ((1 << dbits) - 1) + 1))
|
||||
sed -re "s/(ABITS = )0/\1$abits/g; s/(DBITS = )0/\1$dbits/g; s/(INIT_ADDR = )0/\1$iadr/g; s/(INIT_DATA = )0/\1$idat/g;" < test_bram.v > ${id}.v
|
||||
sed -re "s/(ABITS = )0/\1$abits/g; s/(DBITS = )0/\1$dbits/g; s/(INIT_ADDR = )0/\1$iadr/g; s/(INIT_DATA = )0/\1$idat/g;" < test_bram_tb.v > ${id}_tb.v
|
||||
../../../yosys -ql ${id}_syn.log -p "synth_ice40" -o ${id}_syn.v ${id}.v
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue