Commit a39ab0e0 authored by Bjarne Wintermann's avatar Bjarne Wintermann
Browse files

Important Bugfix!

parent f091e980
......@@ -86,7 +86,7 @@ class DMAMonitoringComponent(Module, AutoCSR):
# Fit the ~84 bits of data into 32 bit chunks
self.submodules.dmaGearbox = gearbox = Gearbox(length, 32)
self.entrySignal = Signal()
self.entrySignal = Signal(length)
say("[MONITOR COMPONENT] Concatting the interface monitors output: ")
......@@ -137,19 +137,22 @@ class DMAMonitoringComponent(Module, AutoCSR):
say(f"[MONITOR COMPONENT] Writing build constants to firmware header files to {HEADER_PATH}")
# Write layout to C header file
with open(HEADER_PATH, 'w+') as f:
f.write("// Automatically generated by the MonitoringComponent during SoC Building\n")
f.write(f"#define BITS_PER_ENTRY {sum([l for _,l in self.interfaceMonitor.outLayout])}\n")
f.write(f"#define NUM_ENTRIES {numElementsToSave}\n")
f.write(f"#define NUM_TRACES {len(self.interfaceMonitor.outLayout)}\n")
f.write(f"char *traceNames[{len(self.interfaceMonitor.outLayout)}] = {{\n")
for n,_ in self.interfaceMonitor.outLayout:
f.write(f"\t\"{n}\",\n")
f.write("};\n")
f.write(f"int traceBitLengths[{len(self.interfaceMonitor.outLayout)}] = {{\n")
for _,l in self.interfaceMonitor.outLayout:
f.write(f"\t{l},\n")
f.write("};\n")
if os.path.isdir(os.path.dirname(HEADER_PATH)):
with open(HEADER_PATH, 'w+') as f:
f.write("// Automatically generated by the MonitoringComponent during SoC Building\n")
f.write(f"#define BITS_PER_ENTRY {sum([l for _,l in self.interfaceMonitor.outLayout])}\n")
f.write(f"#define NUM_ENTRIES {numElementsToSave}\n")
f.write(f"#define NUM_TRACES {len(self.interfaceMonitor.outLayout)}\n")
f.write(f"char *traceNames[{len(self.interfaceMonitor.outLayout)}] = {{\n")
for n,_ in self.interfaceMonitor.outLayout:
f.write(f"\t\"{n}\",\n")
f.write("};\n")
f.write(f"int traceBitLengths[{len(self.interfaceMonitor.outLayout)}] = {{\n")
for _,l in self.interfaceMonitor.outLayout:
f.write(f"\t{l},\n")
f.write("};\n")
else:
say("[MONITOR COMPONENT] Path for header file is invalid (wrong directory? Need to be in the gen.py / soc.py directory). Continuing anyways", error=True)
class GearboxMonitoringComponent(Module, AutoCSR):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment