From 9cfc29e51e106b3f0afb06e983e0ef54a97ef278 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 22 Jul 2018 06:02:55 +0100 Subject: [PATCH] add plic comment --- src/bsv/peripheral_gen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bsv/peripheral_gen.py b/src/bsv/peripheral_gen.py index aabfd8f..002a625 100644 --- a/src/bsv/peripheral_gen.py +++ b/src/bsv/peripheral_gen.py @@ -167,8 +167,9 @@ class PBase(object): niq = self.num_irqs() if niq == 0: return ('', irq_offs) + name = "{0}{1}".format(self.name, self.mksuffix(self.name, inum)) + res.append(" // PLIC rules for {0}".format(name)) for idx in range(niq): - name = "{0}{1}".format(self.name, self.mksuffix(self.name, inum)) plic_obj = self.plic_object(name, idx) print "plic_obj", name, idx, plic_obj plic = mkplic_rule.format(name, plic_obj, irq_offs) @@ -176,8 +177,7 @@ class PBase(object): irq_offs += 1 # increment to next irq return ('\n'.join(res), irq_offs) -mkplic_rule = \ -""" +mkplic_rule = """\ rule rl_connect_{0}_to_plic_{2}; if({1} == 1'b1) begin ff_gateway_queue[{2}].enq(1); -- 2.30.2