Add fixes | Bump to 256b SBUS

This commit is contained in:
abejgonzalez
2023-11-02 17:09:00 -07:00
parent 672392360e
commit 0c1ca5750e
5 changed files with 51 additions and 25 deletions

View File

@@ -235,11 +235,11 @@ lazy val nvdla = (project in file("generators/nvdla"))
.settings(commonSettings) .settings(commonSettings)
lazy val caliptra_aes = (project in file("generators/caliptra-aes-acc")) lazy val caliptra_aes = (project in file("generators/caliptra-aes-acc"))
.dependsOn(rocketchip, rocc_acc_utils, midasTargetUtils) .dependsOn(rocketchip, rocc_acc_utils, testchipip, midasTargetUtils)
.settings(libraryDependencies ++= rocketLibDeps.value) .settings(libraryDependencies ++= rocketLibDeps.value)
.settings(commonSettings) .settings(commonSettings)
llazy val rocc_acc_utils = (project in file("generators/rocc-acc-utils")) lazy val rocc_acc_utils = (project in file("generators/rocc-acc-utils"))
.dependsOn(rocketchip) .dependsOn(rocketchip)
.settings(libraryDependencies ++= rocketLibDeps.value) .settings(libraryDependencies ++= rocketLibDeps.value)
.settings(commonSettings) .settings(commonSettings)

View File

@@ -60,5 +60,5 @@ class HwachaLargeBoomConfig extends Config(
class AES256ECBRocketConfig extends Config( class AES256ECBRocketConfig extends Config(
new aes.WithAES256ECBAccel ++ // use Caliptra AES 256 ECB accelerator new aes.WithAES256ECBAccel ++ // use Caliptra AES 256 ECB accelerator
new freechips.rocketchip.subsystem.WithNBigCores(1) ++ new freechips.rocketchip.subsystem.WithNBigCores(1) ++
new chipyard.config.WithSystemBusWidth(128) ++ new chipyard.config.WithSystemBusWidth(256) ++
new chipyard.config.AbstractConfig) new chipyard.config.AbstractConfig)

View File

@@ -12,6 +12,8 @@
import sys import sys
import re import re
import os import os
import tempfile
import shutil
inVlog = sys.argv[1] inVlog = sys.argv[1]
outVlog = sys.argv[2] outVlog = sys.argv[2]
@@ -24,28 +26,52 @@ if inVlog == outVlog:
incDirs = sys.argv[3:] incDirs = sys.argv[3:]
print("[INFO] Searching following dirs for includes: " + str(incDirs)) print("[INFO] Searching following dirs for includes: " + str(incDirs))
# open file def process(inF, outF):
with open(inVlog, 'r') as inFile: # open file
with open(outVlog, 'w') as outFile: with open(inF, 'r') as inFile:
# for each include found, search through all dirs and replace if found, error if not with open(outF, 'w') as outFile:
for num, line in enumerate(inFile, 1): # for each include found, search through all dirs and replace if found, error if not
for num, line in enumerate(inFile, 1):
match = re.match(r"^ *`include +\"(.*)\"", line)
if match:
# search for include and replace
found = False
for d in incDirs:
potentialIncFileName = d + "/" + match.group(1)
if os.path.exists(potentialIncFileName):
found = True
with open(potentialIncFileName, 'r') as incFile:
for iline in incFile:
outFile.write(iline)
break
# must find something to include with
if not found:
sys.exit("[ERROR] Couldn't replace include \"" + str(match.group(1)) + "\" found on line " + str(num))
else:
outFile.write(line)
inF = inVlog
while True:
# create a copy of the input
fd, temp_path = tempfile.mkstemp()
shutil.copy2(inF, temp_path)
with open(temp_path, 'r') as inFile:
anyIncludes = False
for line in inFile:
match = re.match(r"^ *`include +\"(.*)\"", line) match = re.match(r"^ *`include +\"(.*)\"", line)
if match: if match:
# search for include and replace anyIncludes = True
found = False break
for d in incDirs:
potentialIncFileName = d + "/" + match.group(1)
if os.path.exists(potentialIncFileName):
found = True
with open(potentialIncFileName, 'r') as incFile:
for iline in incFile:
outFile.write(iline)
break
# must find something to include with if anyIncludes:
if not found: process(temp_path, outVlog)
sys.exit("[ERROR] Couldn't replace include \"" + str(match.group(1)) + "\" found on line " + str(num)) inF = outVlog
else: os.remove(temp_path)
outFile.write(line) else:
os.remove(temp_path)
break
print("[INFO] Success. Writing output to: " + str(outVlog)) print("[INFO] Success. Writing output to: " + str(outVlog))