From 7fdb419688cac8f7f3ec362ffb78690a430f6ae7 Mon Sep 17 00:00:00 2001 From: Kevin Kim Date: Mon, 23 Oct 2023 11:26:32 -0700 Subject: [PATCH] bug fixes on synth script --- synthDC/scripts/fp-synth.sh | 49 ++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/synthDC/scripts/fp-synth.sh b/synthDC/scripts/fp-synth.sh index 374d5e5d2..0344acb65 100755 --- a/synthDC/scripts/fp-synth.sh +++ b/synthDC/scripts/fp-synth.sh @@ -42,26 +42,26 @@ sed -i "${n32}s/DIVCOPIES.*/DIVCOPIES = 32\'h4;/" $WALLY/config/rv32gc/config.vh # IDIVBITS = 1 setIDIVBITSeq1 () { -n64=$(grep -n "IDIV_BITSPERCYCLE" $WALLY/config/rv64gc/config.vh | cut -d: -f1) -n32=$(grep -n "IDIV_BITSPERCYCLE" $WALLY/config/rv32gc/config.vh | cut -d: -f1) -sed -i "${n64}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d1/" $WALLY/config/rv64gc/config.vh -sed -i "${n32}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d1/" $WALLY/config/rv32gc/config.vh +n64=$(grep -n "IDIV_BITSPERCYCLE =" $WALLY/config/rv64gc/config.vh | cut -d: -f1) +n32=$(grep -n "IDIV_BITSPERCYCLE =" $WALLY/config/rv32gc/config.vh | cut -d: -f1) +sed -i "${n64}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d1;/" $WALLY/config/rv64gc/config.vh +sed -i "${n32}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d1;/" $WALLY/config/rv32gc/config.vh } # IDIVBITS = 2 setIDIVBITSeq2 () { -n64=$(grep -n "IDIV_BITSPERCYCLE" $WALLY/config/rv64gc/config.vh | cut -d: -f1) -n32=$(grep -n "IDIV_BITSPERCYCLE" $WALLY/config/rv32gc/config.vh | cut -d: -f1) -sed -i "${n64}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d2/" $WALLY/config/rv64gc/config.vh -sed -i "${n32}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d2/" $WALLY/config/rv32gc/config.vh +n64=$(grep -n "IDIV_BITSPERCYCLE =" $WALLY/config/rv64gc/config.vh | cut -d: -f1) +n32=$(grep -n "IDIV_BITSPERCYCLE =" $WALLY/config/rv32gc/config.vh | cut -d: -f1) +sed -i "${n64}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d2;/" $WALLY/config/rv64gc/config.vh +sed -i "${n32}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d2;/" $WALLY/config/rv32gc/config.vh } # IDIVBITS = 4 setIDIVBITSeq4 () { -n64=$(grep -n "IDIV_BITSPERCYCLE" $WALLY/config/rv64gc/config.vh | cut -d: -f1) -n32=$(grep -n "IDIV_BITSPERCYCLE" $WALLY/config/rv32gc/config.vh | cut -d: -f1) -sed -i "${n64}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d4/" $WALLY/config/rv64gc/config.vh -sed -i "${n32}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d4/" $WALLY/config/rv32gc/config.vh +n64=$(grep -n "IDIV_BITSPERCYCLE =" $WALLY/config/rv64gc/config.vh | cut -d: -f1) +n32=$(grep -n "IDIV_BITSPERCYCLE =" $WALLY/config/rv32gc/config.vh | cut -d: -f1) +sed -i "${n64}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d4;/" $WALLY/config/rv64gc/config.vh +sed -i "${n32}s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d4;/" $WALLY/config/rv32gc/config.vh } # IDIV ON FPU @@ -159,12 +159,33 @@ writeCSV () { go() { +<< comment +setIDIVeq1 setKeq1 setRADIXeq4 -synthAll +synthFPDiv wait setKeq2 setRADIXeq2 -synthAll +synthFPDiv +wait +comment +setIDIVBITSeq1 +synthIntDiv +setIDIVBITSeq2 +synthIntDiv +setIDIVBITSeq4 +synthIntDiv +<< comment +setIDIVeq0 +setKeq1 +setRADIXeq4 +synthFPDiv +wait +setKeq2 +setRADIXeq2 +synthFPDiv +comment + }