aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rwxr-xr-xconfig/config.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/config/config.py b/config/config.py
index 65c540f..ddf7d0b 100755
--- a/config/config.py
+++ b/config/config.py
@@ -111,7 +111,18 @@ class Core(object):
return createMux_template.format(core = self, core0 = self)
def listVfiles(self):
- return "".join(" \\\n\t$(core_tree)/" + vfile for vfile in self.vfiles)
+ return "".join(" \\\n\t$(CORE_TREE)/" + vfile for vfile in self.vfiles)
+
+
+class BoardCore(Core):
+ """
+ Board-level cores have a slightly different API, which we handle
+ with a different template, at least for now.
+ """
+
+ def createInstance(self):
+ return createInstance_template_board.format(core = self)
+
class SubCore(Core):
""""
@@ -126,16 +137,6 @@ class SubCore(Core):
return createMux_template.format(core = self, core0 = self.parent)
-class BoardCore(Core):
- """
- Board-level cores have a slightly different API, which we handle
- with a different template.
- """
-
- def createInstance(self):
- return createInstance_template_board.format(core = self)
-
-
class TRNGCore(Core):
"""
The TRNG core has an internal mux and a collection of sub-cores.
@@ -144,9 +145,11 @@ class TRNGCore(Core):
a different instance template in the hope that it is easier to read.
"""
+ subcore_names = ("avalanche_entropy", "rosc_entropy", "trng_mixer", "trng_csprng")
+
def __init__(self, name):
super(TRNGCore, self).__init__(name)
- self.subcores = tuple(SubCore(name, self) for name in ("avalanche_entropy", "rosc_entropy", "trng_mixer", "trng_csprng"))
+ self.subcores = tuple(SubCore(name, self) for name in self.subcore_names)
def assign_core_number(self, n):
n = super(TRNGCore, self).assign_core_number(n)