From aa55cb1f614bfbfd7bd7d8bfc8219e79d3857686 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 28 Jul 2018 10:18:10 +0100 Subject: [PATCH] put PADDR_WIDTH separate from ADDR_WIDTH --- src/bsv/pinmux_generator.py | 6 ++++-- src/parse.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bsv/pinmux_generator.py b/src/bsv/pinmux_generator.py index 36d6e4e..83e0e0e 100644 --- a/src/bsv/pinmux_generator.py +++ b/src/bsv/pinmux_generator.py @@ -443,7 +443,7 @@ def write_instances(idef, p, ifaces): with open(idef, 'w') as bsv_file: txt = '''\ `define ADDR {0} -`define PADDR 32 +`define PADDR {2} `define DATA {1} `define Reg_width {1} `define USERSPACE 0 @@ -473,4 +473,6 @@ def write_instances(idef, p, ifaces): `define BAUD_RATE 5 //130 // `endif ''' - bsv_file.write(txt.format(p.ADDR_WIDTH, p.DATA_WIDTH)) + bsv_file.write(txt.format(p.ADDR_WIDTH, + p.DATA_WIDTH, + p.PADDR_WIDTH)) diff --git a/src/parse.py b/src/parse.py index 7a42f57..9c5bdef 100644 --- a/src/parse.py +++ b/src/parse.py @@ -15,6 +15,7 @@ class Parse(object): N_MUX_IO = 0 Addressing = 'WORD' ADDR_WIDTH = 32 # TODO parameterise + PADDR_WIDTH = 32 # TODO parameterise DATA_WIDTH = 64 # TODO parameterise # ================ # -- 2.30.2