Added SUPPORTED to each peripheral in each config file

This commit is contained in:
David Harris 2021-06-17 21:36:32 -04:00
parent 4e0546a7a0
commit 679e507cc6
10 changed files with 106 additions and 44 deletions

View File

@ -1,5 +1,5 @@
////////////////////////////////////////// //////////////////////////////////////////
// busybear-config.vh // wally-config.vh
// //
// Written: David_Harris@hmc.edu 4 January 2021 // Written: David_Harris@hmc.edu 4 January 2021
// Modified: // Modified:
@ -61,22 +61,27 @@
// Peripheral Addresses // Peripheral Addresses
// Peripheral memory space extends from BASE to BASE+RANGE // Peripheral memory space extends from BASE to BASE+RANGE
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits // Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
`define BOOTTIMSUPPORTED 1'b1
`define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder `define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define BOOTTIMRANGE 32'h00003FFF `define BOOTTIMRANGE 32'h00003FFF
`define CLINTBASE 32'h02000000 //`define BOOTTIMBASE 32'h00001000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define CLINTRANGE 32'h0000FFFF //`define BOOTTIMRANGE 32'h00000FFF
`define PLICBASE 32'h0C000000 `define TIMSUPPORTED 1'b1
`define PLICRANGE 32'h03FFFFFF
`define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007
`define VBD0BASE 32'h10001000
`define VBD0RANGE 32'h000001FF
// differing from Imperas' OVPSim by not having a VND0
`define GPIOBASE 32'h20000000
`define GPIORANGE 32'h000000FF
`define TIMBASE 32'h80000000 `define TIMBASE 32'h80000000
`define TIMRANGE 32'h07FFFFFF `define TIMRANGE 32'h07FFFFFF
`define CLINTSUPPORTED 1'b1
`define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF
`define GPIOSUPPORTED 1'b1
`define GPIOBASE 32'h10012000
`define GPIORANGE 32'h000000FF
`define UARTSUPPORTED 1'b1
`define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007
`define PLICSUPPORTED 1'b1
`define PLICBASE 32'h0C000000
`define PLICRANGE 32'h03FFFFFF
// Bus Interface width // Bus Interface width
`define AHBW 64 `define AHBW 64

View File

@ -62,21 +62,27 @@
// Peripheral memory space extends from BASE to BASE+RANGE // Peripheral memory space extends from BASE to BASE+RANGE
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits // Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
`define BOOTTIMSUPPORTED 1'b1
`define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder `define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define BOOTTIMRANGE 32'h00003FFF `define BOOTTIMRANGE 32'h00003FFF
`define CLINTBASE 32'h02000000 //`define BOOTTIMBASE 32'h00001000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define CLINTRANGE 32'h0000FFFF //`define BOOTTIMRANGE 32'h00000FFF
`define PLICBASE 32'h0C000000 `define TIMSUPPORTED 1'b1
`define PLICRANGE 32'h03FFFFFF
`define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007
`define VBD0BASE 32'h10001000
`define VBD0RANGE 32'h000001FF
// differing from Imperas' OVPSim by not having a VND0
`define GPIOBASE 32'h20000000
`define GPIORANGE 32'h000000FF
`define TIMBASE 32'h80000000 `define TIMBASE 32'h80000000
`define TIMRANGE 32'h07FFFFFF `define TIMRANGE 32'h07FFFFFF
`define CLINTSUPPORTED 1'b1
`define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF
`define GPIOSUPPORTED 1'b1
`define GPIOBASE 32'h10012000
`define GPIORANGE 32'h000000FF
`define UARTSUPPORTED 1'b1
`define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007
`define PLICSUPPORTED 1'b1
`define PLICBASE 32'h0C000000
`define PLICRANGE 32'h03FFFFFF
// Bus Interface width // Bus Interface width
`define AHBW 64 `define AHBW 64

View File

@ -54,14 +54,26 @@
// Peripheral memory space extends from BASE to BASE+RANGE // Peripheral memory space extends from BASE to BASE+RANGE
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits // Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
`define TIMBASE 32'h80000000 `define BOOTTIMSUPPORTED 1'b1
`define TIMRANGE 32'h0007FFFF `define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define BOOTTIMRANGE 32'h00003FFF
//`define BOOTTIMBASE 32'h00001000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
//`define BOOTTIMRANGE 32'h00000FFF
`define TIMSUPPORTED 1'b1
`define TIMBASE 32'h80000000
`define TIMRANGE 32'h07FFFFFF
`define CLINTSUPPORTED 1'b1
`define CLINTBASE 32'h02000000 `define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF `define CLINTRANGE 32'h0000FFFF
`define GPIOSUPPORTED 1'b1
`define GPIOBASE 32'h10012000 `define GPIOBASE 32'h10012000
`define GPIORANGE 32'h000000FF `define GPIORANGE 32'h000000FF
`define UARTSUPPORTED 1'b1
`define UARTBASE 32'h10000000 `define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007 `define UARTRANGE 32'h00000007
`define PLICSUPPORTED 1'b1
`define PLICBASE 32'h0C000000
`define PLICRANGE 32'h03FFFFFF
// Test modes // Test modes

View File

@ -62,16 +62,24 @@
// Peripheral memory space extends from BASE to BASE+RANGE // Peripheral memory space extends from BASE to BASE+RANGE
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits // Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
`define BOOTTIMSUPPORTED 1'b1
`define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder `define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define BOOTTIMRANGE 32'h00003FFF `define BOOTTIMRANGE 32'h00003FFF
`define TIMBASE 32'h00000000 //`define BOOTTIMBASE 32'h00001000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define TIMRANGE 32'hFFFFFFFF //`define BOOTTIMRANGE 32'h00000FFF
`define TIMSUPPORTED 1'b1
`define TIMBASE 32'h80000000
`define TIMRANGE 32'h07FFFFFF
`define CLINTSUPPORTED 1'b1
`define CLINTBASE 32'h02000000 `define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF `define CLINTRANGE 32'h0000FFFF
`define GPIOSUPPORTED 1'b1
`define GPIOBASE 32'h10012000 `define GPIOBASE 32'h10012000
`define GPIORANGE 32'h000000FF `define GPIORANGE 32'h000000FF
`define UARTSUPPORTED 1'b1
`define UARTBASE 32'h10000000 `define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007 `define UARTRANGE 32'h00000007
`define PLICSUPPORTED 1'b1
`define PLICBASE 32'h0C000000 `define PLICBASE 32'h0C000000
`define PLICRANGE 32'h03FFFFFF `define PLICRANGE 32'h03FFFFFF

View File

@ -62,16 +62,24 @@
// Peripheral memory space extends from BASE to BASE+RANGE // Peripheral memory space extends from BASE to BASE+RANGE
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits // Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
`define BOOTTIMSUPPORTED 1'b1
`define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder `define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define BOOTTIMRANGE 32'h00003FFF `define BOOTTIMRANGE 32'h00003FFF
`define TIMBASE 32'h80000000 //`define BOOTTIMBASE 32'h00001000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define TIMRANGE 32'h000FFFFF //`define BOOTTIMRANGE 32'h00000FFF
`define TIMSUPPORTED 1'b1
`define TIMBASE 32'h80000000
`define TIMRANGE 32'h07FFFFFF
`define CLINTSUPPORTED 1'b1
`define CLINTBASE 32'h02000000 `define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF `define CLINTRANGE 32'h0000FFFF
`define GPIOSUPPORTED 1'b1
`define GPIOBASE 32'h10012000 `define GPIOBASE 32'h10012000
`define GPIORANGE 32'h000000FF `define GPIORANGE 32'h000000FF
`define UARTSUPPORTED 1'b1
`define UARTBASE 32'h10000000 `define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007 `define UARTRANGE 32'h00000007
`define PLICSUPPORTED 1'b1
`define PLICBASE 32'h0C000000 `define PLICBASE 32'h0C000000
`define PLICRANGE 32'h03FFFFFF `define PLICRANGE 32'h03FFFFFF

View File

@ -63,16 +63,24 @@
// Peripheral memory space extends from BASE to BASE+RANGE // Peripheral memory space extends from BASE to BASE+RANGE
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits // Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
`define BOOTTIMSUPPORTED 1'b1
`define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder `define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define BOOTTIMRANGE 32'h00003FFF `define BOOTTIMRANGE 32'h00003FFF
`define TIMBASE 32'h00000000 //`define BOOTTIMBASE 32'h00001000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
//`define BOOTTIMRANGE 32'h00000FFF
`define TIMSUPPORTED 1'b1
`define TIMBASE 32'h80000000
`define TIMRANGE 32'h07FFFFFF `define TIMRANGE 32'h07FFFFFF
`define CLINTSUPPORTED 1'b1
`define CLINTBASE 32'h02000000 `define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF `define CLINTRANGE 32'h0000FFFF
`define GPIOSUPPORTED 1'b1
`define GPIOBASE 32'h10012000 `define GPIOBASE 32'h10012000
`define GPIORANGE 32'h000000FF `define GPIORANGE 32'h000000FF
`define UARTSUPPORTED 1'b1
`define UARTBASE 32'h10000000 `define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007 `define UARTRANGE 32'h00000007
`define PLICSUPPORTED 1'b1
`define PLICBASE 32'h0C000000 `define PLICBASE 32'h0C000000
`define PLICRANGE 32'h03FFFFFF `define PLICRANGE 32'h03FFFFFF

View File

@ -65,17 +65,24 @@
// Peripheral memory space extends from BASE to BASE+RANGE // Peripheral memory space extends from BASE to BASE+RANGE
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits // Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
`define BOOTTIMBASE 32'h00000000 `define BOOTTIMSUPPORTED 1'b1
`define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define BOOTTIMRANGE 32'h00003FFF `define BOOTTIMRANGE 32'h00003FFF
`define TIMBASE 32'h80000000 //`define BOOTTIMBASE 32'h00001000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
// `define TIMRANGE 32'h0007FFFF //`define BOOTTIMRANGE 32'h00000FFF
`define TIMRANGE 32'h07FFFFFF `define TIMSUPPORTED 1'b1
`define TIMBASE 32'h80000000
`define TIMRANGE 32'h07FFFFFF
`define CLINTSUPPORTED 1'b1
`define CLINTBASE 32'h02000000 `define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF `define CLINTRANGE 32'h0000FFFF
`define GPIOSUPPORTED 1'b1
`define GPIOBASE 32'h10012000 `define GPIOBASE 32'h10012000
`define GPIORANGE 32'h000000FF `define GPIORANGE 32'h000000FF
`define UARTSUPPORTED 1'b1
`define UARTBASE 32'h10000000 `define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007 `define UARTRANGE 32'h00000007
`define PLICSUPPORTED 1'b1
`define PLICBASE 32'h0C000000 `define PLICBASE 32'h0C000000
`define PLICRANGE 32'h03FFFFFF `define PLICRANGE 32'h03FFFFFF

View File

@ -61,16 +61,24 @@
// Peripheral memory space extends from BASE to BASE+RANGE // Peripheral memory space extends from BASE to BASE+RANGE
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits // Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
`define BOOTTIMSUPPORTED 1'b1
`define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder `define BOOTTIMBASE 32'h00000000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define BOOTTIMRANGE 32'h00003FFF `define BOOTTIMRANGE 32'h00003FFF
`define TIMBASE 32'h80000000 //`define BOOTTIMBASE 32'h00001000 // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
`define TIMRANGE 32'h0007FFFF //`define BOOTTIMRANGE 32'h00000FFF
`define TIMSUPPORTED 1'b1
`define TIMBASE 32'h80000000
`define TIMRANGE 32'h07FFFFFF
`define CLINTSUPPORTED 1'b1
`define CLINTBASE 32'h02000000 `define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF `define CLINTRANGE 32'h0000FFFF
`define GPIOSUPPORTED 1'b1
`define GPIOBASE 32'h10012000 `define GPIOBASE 32'h10012000
`define GPIORANGE 32'h000000FF `define GPIORANGE 32'h000000FF
`define UARTSUPPORTED 1'b1
`define UARTBASE 32'h10000000 `define UARTBASE 32'h10000000
`define UARTRANGE 32'h00000007 `define UARTRANGE 32'h00000007
`define PLICSUPPORTED 1'b1
`define PLICBASE 32'h0C000000 `define PLICBASE 32'h0C000000
`define PLICRANGE 32'h03FFFFFF `define PLICRANGE 32'h03FFFFFF

View File

@ -35,7 +35,7 @@ module pmaadrdec (
output logic HSEL output logic HSEL
); );
logic [31:0] match; logic match;
// determine if an address is in a range starting at the base // determine if an address is in a range starting at the base
// for example, if Base = 0x04002000 and range = 0x00000FFF, // for example, if Base = 0x04002000 and range = 0x00000FFF,

View File

@ -64,12 +64,12 @@ module pmachecker (
// Determine which region of physical memory (if any) is being accessed // Determine which region of physical memory (if any) is being accessed
pmaadrdec boottimdec(HADDR, `BOOTTIMBASE, `BOOTTIMRANGE, `BOOTTIMSUPPORTED, AccessRX, Size, 4'b1111, BootTim); pmaadrdec boottimdec(HADDR, `BOOTTIMBASE, `BOOTTIMRANGE, `BOOTTIMSUPPORTED, AccessRX, HSIZE, 4'b1111, BootTim);
pmaadrdec timdec(HADDR, `TIMBASE, `TIMRANGE, `TIMSUPPORTED, AccessRWX, Size, 4'b1111, Tim); pmaadrdec timdec(HADDR, `TIMBASE, `TIMRANGE, `TIMSUPPORTED, AccessRWX, HSIZE, 4'b1111, Tim);
pmaadrdec clintdec(HADDR, `CLINTBASE, `CLINTRANGE, `CLINTSUPPORTED, AccessRW, Size, (`XLEN==64 ? 4'b1000 : 4'b0100), CLINT); pmaadrdec clintdec(HADDR, `CLINTBASE, `CLINTRANGE, `CLINTSUPPORTED, AccessRW, HSIZE, (`XLEN==64 ? 4'b1000 : 4'b0100), CLINT);
pmaadrdec gpiodec(HADDR, `GPIOBASE, `GPIORANGE, `GPIOSUPPORTED, AccessRW, Size, 4'b0100, GPIO); pmaadrdec gpiodec(HADDR, `GPIOBASE, `GPIORANGE, `GPIOSUPPORTED, AccessRW, HSIZE, 4'b0100, GPIO);
pmaadrdec uartdec(HADDR, `UARTBASE, `UARTRANGE, `UARTSUPPORTED, AccessRW, Size, 4'b0001, UART); pmaadrdec uartdec(HADDR, `UARTBASE, `UARTRANGE, `UARTSUPPORTED, AccessRW, HSIZE, 4'b0001, UART);
pmaadrdec plicdec(HADDR, `PLICBASE, `PLICRANGE, `PLICSUPPORTED, AccessRW, Size, 4'b0100, PLIC); pmaadrdec plicdec(HADDR, `PLICBASE, `PLICRANGE, `PLICSUPPORTED, AccessRW, HSIZE, 4'b0100, PLIC);
// Swizzle region bits // Swizzle region bits
assign Regions = {BootTim, Tim, CLINT, GPIO, UART, PLIC}; assign Regions = {BootTim, Tim, CLINT, GPIO, UART, PLIC};