From: Luke Kenneth Casson Leighton Date: Sat, 28 Jul 2018 09:18:10 +0000 (+0100) Subject: put PADDR_WIDTH separate from ADDR_WIDTH X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa55cb1f614bfbfd7bd7d8bfc8219e79d3857686;p=pinmux.git put PADDR_WIDTH separate from ADDR_WIDTH --- 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 # ================ #