fix compile errors
authorNeel <neelgala@gmail.com>
Sat, 21 Jul 2018 06:03:27 +0000 (11:33 +0530)
committerNeel <neelgala@gmail.com>
Sat, 21 Jul 2018 06:03:27 +0000 (11:33 +0530)
src/bsv/bsv_lib/Uart16550.bsv
src/bsv/pinmux_generator.py

index 54de1aeb725ba09cdc2bc2332434f8f45ef6c808..ae97d23b109b51dbd92a7eb129acf41f3114af72 100644 (file)
@@ -73,7 +73,7 @@ import defined_types::*;
 import AXI4_Lite_Types::*;
 import AXI4_Lite_Fabric::*;
 import Semi_FIFOF::*;
-`include "defined_parameters.bsv" 
+`include "instance_defines.bsv" 
 
 // depth of transmit and receive FIFOs
 typedef 16 Tx_FIFO_depth;
index 3de806301fc0cb9a7178776242cb14805619c0d9..fd94028698f7f12d6b5994cc48f082476cd511bb 100644 (file)
@@ -76,6 +76,7 @@ def pinmuxgen(pth=None, verify=True):
                   'gpio.bsv', 'mux.bsv', 
                   'AXI4_Types.bsv', 'defined_types.bsv', 
                   'AXI4_Fabric.bsv', 'Uart16550.bsv', 
+                  'AXI4_Lite_Fabric.bsv', 'ConcatReg.bsv', 
                   'Uart_bs.bsv', 'RS232_modified.bsv', 
                   'AXI4Lite_AXI4_Bridge.bsv',
                   'I2C_top.bsv', 'I2C_Defs.bsv', 
@@ -385,8 +386,28 @@ def write_bvp(bvp, p, ifaces):
 def write_instances(idef, p, ifaces):
     with open(idef, 'w') as bsv_file:
         txt = '''\
-    `define ADDR {0}
-    `define DATA {1}
-    `define USERSPACE 0
+`define ADDR {0}
+`define PADDR {0}
+`define DATA {1}
+`define Reg_width {1}
+`define USERSPACE 0
+
+// TODO: work out if these are needed
+`define PRFDEPTH 6
+`define VADDR 39
+`define DCACHE_BLOCK_SIZE 4
+`define DCACHE_WORD_SIZE 8
+`define PERFMONITORS                            64
+`define DCACHE_WAYS 4
+`define DCACHE_TAG_BITS 20      // tag_bits = 52
+`define PLIC
+       `define PLICBase                'h0c000000
+       `define PLICEnd         'h10000000
+`define INTERRUPT_PINS 64
+
+`define BAUD_RATE 130
+`ifdef simulate
+  `define BAUD_RATE 5 //130 //
+`endif
 '''
         bsv_file.write(txt.format(p.ADDR_WIDTH, p.DATA_WIDTH))