mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Merge branch 'main' of github.com:davidharrishmc/riscv-wally into main
This commit is contained in:
		
						commit
						bdb3417656
					
				@ -41,7 +41,7 @@ connect_debug_port u_ila_0/probe5 [get_nets [list {wallypipelinedsoc/core/ReadDa
 | 
			
		||||
create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 64 [get_debug_ports u_ila_0/probe6]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe6]
 | 
			
		||||
connect_debug_port u_ila_0/probe6 [get_nets [list {wallypipelinedsoc/core/WriteDataM[0]} {wallypipelinedsoc/core/WriteDataM[1]} {wallypipelinedsoc/core/WriteDataM[2]} {wallypipelinedsoc/core/WriteDataM[3]} {wallypipelinedsoc/core/WriteDataM[4]} {wallypipelinedsoc/core/WriteDataM[5]} {wallypipelinedsoc/core/WriteDataM[6]} {wallypipelinedsoc/core/WriteDataM[7]} {wallypipelinedsoc/core/WriteDataM[8]} {wallypipelinedsoc/core/WriteDataM[9]} {wallypipelinedsoc/core/WriteDataM[10]} {wallypipelinedsoc/core/WriteDataM[11]} {wallypipelinedsoc/core/WriteDataM[12]} {wallypipelinedsoc/core/WriteDataM[13]} {wallypipelinedsoc/core/WriteDataM[14]} {wallypipelinedsoc/core/WriteDataM[15]} {wallypipelinedsoc/core/WriteDataM[16]} {wallypipelinedsoc/core/WriteDataM[17]} {wallypipelinedsoc/core/WriteDataM[18]} {wallypipelinedsoc/core/WriteDataM[19]} {wallypipelinedsoc/core/WriteDataM[20]} {wallypipelinedsoc/core/WriteDataM[21]} {wallypipelinedsoc/core/WriteDataM[22]} {wallypipelinedsoc/core/WriteDataM[23]} {wallypipelinedsoc/core/WriteDataM[24]} {wallypipelinedsoc/core/WriteDataM[25]} {wallypipelinedsoc/core/WriteDataM[26]} {wallypipelinedsoc/core/WriteDataM[27]} {wallypipelinedsoc/core/WriteDataM[28]} {wallypipelinedsoc/core/WriteDataM[29]} {wallypipelinedsoc/core/WriteDataM[30]} {wallypipelinedsoc/core/WriteDataM[31]} {wallypipelinedsoc/core/WriteDataM[32]} {wallypipelinedsoc/core/WriteDataM[33]} {wallypipelinedsoc/core/WriteDataM[34]} {wallypipelinedsoc/core/WriteDataM[35]} {wallypipelinedsoc/core/WriteDataM[36]} {wallypipelinedsoc/core/WriteDataM[37]} {wallypipelinedsoc/core/WriteDataM[38]} {wallypipelinedsoc/core/WriteDataM[39]} {wallypipelinedsoc/core/WriteDataM[40]} {wallypipelinedsoc/core/WriteDataM[41]} {wallypipelinedsoc/core/WriteDataM[42]} {wallypipelinedsoc/core/WriteDataM[43]} {wallypipelinedsoc/core/WriteDataM[44]} {wallypipelinedsoc/core/WriteDataM[45]} {wallypipelinedsoc/core/WriteDataM[46]} {wallypipelinedsoc/core/WriteDataM[47]} {wallypipelinedsoc/core/WriteDataM[48]} {wallypipelinedsoc/core/WriteDataM[49]} {wallypipelinedsoc/core/WriteDataM[50]} {wallypipelinedsoc/core/WriteDataM[51]} {wallypipelinedsoc/core/WriteDataM[52]} {wallypipelinedsoc/core/WriteDataM[53]} {wallypipelinedsoc/core/WriteDataM[54]} {wallypipelinedsoc/core/WriteDataM[55]} {wallypipelinedsoc/core/WriteDataM[56]} {wallypipelinedsoc/core/WriteDataM[57]} {wallypipelinedsoc/core/WriteDataM[58]} {wallypipelinedsoc/core/WriteDataM[59]} {wallypipelinedsoc/core/WriteDataM[60]} {wallypipelinedsoc/core/WriteDataM[61]} {wallypipelinedsoc/core/WriteDataM[62]} {wallypipelinedsoc/core/WriteDataM[63]} ]]
 | 
			
		||||
connect_debug_port u_ila_0/probe6 [get_nets [list {wallypipelinedsoc/core/lsu/WriteDataM[0]} {wallypipelinedsoc/core/lsu/WriteDataM[1]} {wallypipelinedsoc/core/lsu/WriteDataM[2]} {wallypipelinedsoc/core/lsu/WriteDataM[3]} {wallypipelinedsoc/core/lsu/WriteDataM[4]} {wallypipelinedsoc/core/lsu/WriteDataM[5]} {wallypipelinedsoc/core/lsu/WriteDataM[6]} {wallypipelinedsoc/core/lsu/WriteDataM[7]} {wallypipelinedsoc/core/lsu/WriteDataM[8]} {wallypipelinedsoc/core/lsu/WriteDataM[9]} {wallypipelinedsoc/core/lsu/WriteDataM[10]} {wallypipelinedsoc/core/lsu/WriteDataM[11]} {wallypipelinedsoc/core/lsu/WriteDataM[12]} {wallypipelinedsoc/core/lsu/WriteDataM[13]} {wallypipelinedsoc/core/lsu/WriteDataM[14]} {wallypipelinedsoc/core/lsu/WriteDataM[15]} {wallypipelinedsoc/core/lsu/WriteDataM[16]} {wallypipelinedsoc/core/lsu/WriteDataM[17]} {wallypipelinedsoc/core/lsu/WriteDataM[18]} {wallypipelinedsoc/core/lsu/WriteDataM[19]} {wallypipelinedsoc/core/lsu/WriteDataM[20]} {wallypipelinedsoc/core/lsu/WriteDataM[21]} {wallypipelinedsoc/core/lsu/WriteDataM[22]} {wallypipelinedsoc/core/lsu/WriteDataM[23]} {wallypipelinedsoc/core/lsu/WriteDataM[24]} {wallypipelinedsoc/core/lsu/WriteDataM[25]} {wallypipelinedsoc/core/lsu/WriteDataM[26]} {wallypipelinedsoc/core/lsu/WriteDataM[27]} {wallypipelinedsoc/core/lsu/WriteDataM[28]} {wallypipelinedsoc/core/lsu/WriteDataM[29]} {wallypipelinedsoc/core/lsu/WriteDataM[30]} {wallypipelinedsoc/core/lsu/WriteDataM[31]} {wallypipelinedsoc/core/lsu/WriteDataM[32]} {wallypipelinedsoc/core/lsu/WriteDataM[33]} {wallypipelinedsoc/core/lsu/WriteDataM[34]} {wallypipelinedsoc/core/lsu/WriteDataM[35]} {wallypipelinedsoc/core/lsu/WriteDataM[36]} {wallypipelinedsoc/core/lsu/WriteDataM[37]} {wallypipelinedsoc/core/lsu/WriteDataM[38]} {wallypipelinedsoc/core/lsu/WriteDataM[39]} {wallypipelinedsoc/core/lsu/WriteDataM[40]} {wallypipelinedsoc/core/lsu/WriteDataM[41]} {wallypipelinedsoc/core/lsu/WriteDataM[42]} {wallypipelinedsoc/core/lsu/WriteDataM[43]} {wallypipelinedsoc/core/lsu/WriteDataM[44]} {wallypipelinedsoc/core/lsu/WriteDataM[45]} {wallypipelinedsoc/core/lsu/WriteDataM[46]} {wallypipelinedsoc/core/lsu/WriteDataM[47]} {wallypipelinedsoc/core/lsu/WriteDataM[48]} {wallypipelinedsoc/core/lsu/WriteDataM[49]} {wallypipelinedsoc/core/lsu/WriteDataM[50]} {wallypipelinedsoc/core/lsu/WriteDataM[51]} {wallypipelinedsoc/core/lsu/WriteDataM[52]} {wallypipelinedsoc/core/lsu/WriteDataM[53]} {wallypipelinedsoc/core/lsu/WriteDataM[54]} {wallypipelinedsoc/core/lsu/WriteDataM[55]} {wallypipelinedsoc/core/lsu/WriteDataM[56]} {wallypipelinedsoc/core/lsu/WriteDataM[57]} {wallypipelinedsoc/core/lsu/WriteDataM[58]} {wallypipelinedsoc/core/lsu/WriteDataM[59]} {wallypipelinedsoc/core/lsu/WriteDataM[60]} {wallypipelinedsoc/core/lsu/WriteDataM[61]} {wallypipelinedsoc/core/lsu/WriteDataM[62]} {wallypipelinedsoc/core/lsu/WriteDataM[63]} ]]
 | 
			
		||||
create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 64 [get_debug_ports u_ila_0/probe7]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe7]
 | 
			
		||||
@ -122,7 +122,7 @@ connect_debug_port u_ila_0/probe25 [get_nets [list {wallypipelinedsoc/uncore/sdc
 | 
			
		||||
create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 12 [get_debug_ports u_ila_0/probe26]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe26]
 | 
			
		||||
connect_debug_port u_ila_0/probe26 [get_nets [list {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[0]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[1]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[2]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[3]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[4]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[5]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[6]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[7]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[8]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[9]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[10]} {wallypipelinedsoc/core/priv.priv/trap/PendingIntsM[11]} ]]
 | 
			
		||||
connect_debug_port u_ila_0/probe26 [get_nets [list {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[0]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[1]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[2]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[3]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[4]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[5]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[6]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[7]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[8]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[9]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[10]} {wallypipelinedsoc/core/priv.priv/trap/MPendingIntsM[11]} ]]
 | 
			
		||||
create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 64 [get_debug_ports u_ila_0/probe27]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe27]
 | 
			
		||||
@ -155,6 +155,7 @@ create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 1 [get_debug_ports u_ila_0/probe34]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe34]
 | 
			
		||||
connect_debug_port u_ila_0/probe34 [get_nets [list wallypipelinedsoc/core/lsu/LSUBusWrite ]]
 | 
			
		||||
 | 
			
		||||
create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 1 [get_debug_ports u_ila_0/probe35]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe35]
 | 
			
		||||
@ -195,10 +196,12 @@ create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 1 [get_debug_ports u_ila_0/probe44]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe44]
 | 
			
		||||
connect_debug_port u_ila_0/probe44 [get_nets [list wallypipelinedsoc/core/priv.priv/trap/InstrPageFaultM ]]
 | 
			
		||||
 | 
			
		||||
create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 1 [get_debug_ports u_ila_0/probe45]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe45]
 | 
			
		||||
connect_debug_port u_ila_0/probe45 [get_nets [list wallypipelinedsoc/core/InstrValidM ]]
 | 
			
		||||
 | 
			
		||||
create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 1 [get_debug_ports u_ila_0/probe46]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe46]
 | 
			
		||||
@ -553,9 +556,9 @@ set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe119]
 | 
			
		||||
connect_debug_port u_ila_0/probe119 [get_nets [list wallypipelinedsoc/core/lsu/DTLBWriteM]]
 | 
			
		||||
 | 
			
		||||
create_debug_port u_ila_0 probe
 | 
			
		||||
set_property port_width 11 [get_debug_ports u_ila_0/probe120]
 | 
			
		||||
set_property port_width 4 [get_debug_ports u_ila_0/probe120]
 | 
			
		||||
set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe120]
 | 
			
		||||
connect_debug_port u_ila_0/probe120 [get_nets [list {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[0]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[1]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[2]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[3]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[4]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[5]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[6]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[7]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[8]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[9]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[10]}]]
 | 
			
		||||
connect_debug_port u_ila_0/probe120 [get_nets [list {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[0]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[1]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[2]} {wallypipelinedsoc/core/lsu/VIRTMEM_SUPPORTED.lsuvirtmem/hptw/WalkerState[3]}]]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
create_debug_port u_ila_0 probe
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										42
									
								
								fpga/generator/bootrom.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								fpga/generator/bootrom.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,42 @@
 | 
			
		||||
94e1819300002197
 | 
			
		||||
4281420141014081
 | 
			
		||||
4481440143814301
 | 
			
		||||
4681460145814501
 | 
			
		||||
4881480147814701
 | 
			
		||||
4a814a0149814901
 | 
			
		||||
4c814c014b814b01
 | 
			
		||||
4e814e014d814d01
 | 
			
		||||
0110011b4f814f01
 | 
			
		||||
059b45011161016e
 | 
			
		||||
0004063705fe0010
 | 
			
		||||
05a000ef8006061b
 | 
			
		||||
0ff003930000100f
 | 
			
		||||
4e952e3110060e37
 | 
			
		||||
c602829b0053f2b7
 | 
			
		||||
2023fe02dfe312fd
 | 
			
		||||
829b0053f2b7007e
 | 
			
		||||
fe02dfe312fdc602
 | 
			
		||||
4de31efd000e2023
 | 
			
		||||
059bf1402573fdd0
 | 
			
		||||
0000061705e20870
 | 
			
		||||
0010029b01260613
 | 
			
		||||
11010002806702fe
 | 
			
		||||
84b2842ae426e822
 | 
			
		||||
892ee04aec064505
 | 
			
		||||
06e000ef07e000ef
 | 
			
		||||
979334fd02905563
 | 
			
		||||
07930177d4930204
 | 
			
		||||
4089093394be2004
 | 
			
		||||
04138522008905b3
 | 
			
		||||
19e3014000ef2004
 | 
			
		||||
64a2644260e2fe94
 | 
			
		||||
6749808261056902
 | 
			
		||||
dfed8b8510472783
 | 
			
		||||
2423479110a73823
 | 
			
		||||
10472783674910f7
 | 
			
		||||
20058693ffed8b89
 | 
			
		||||
05a1118737836749
 | 
			
		||||
fed59be3fef5bc23
 | 
			
		||||
1047278367498082
 | 
			
		||||
67c98082dfed8b85
 | 
			
		||||
0000808210a7a023
 | 
			
		||||
@ -52,6 +52,9 @@ report_utilization -hierarchical                                        -file re
 | 
			
		||||
report_cdc                                                              -file reports/cdc.rpt
 | 
			
		||||
report_clock_interaction                                                -file reports/clock_interaction.rpt
 | 
			
		||||
 | 
			
		||||
write_verilog -force -mode funcsim sim/syn-funcsim.v
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
source ../constraints/debug2.xdc
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@ onbreak {resume}
 | 
			
		||||
# create library
 | 
			
		||||
vlib worklib
 | 
			
		||||
 | 
			
		||||
vlog -lint -work worklib fma16.sv testbench.v
 | 
			
		||||
vlog -lint -sv -work worklib fma16.v testbench.v
 | 
			
		||||
vopt +acc worklib.testbench_fma16 -work worklib -o testbenchopt
 | 
			
		||||
vsim -lib worklib testbenchopt
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -5,4 +5,4 @@ export PATH=$PATH:/usr/local/bin/
 | 
			
		||||
verilator=`which verilator`
 | 
			
		||||
 | 
			
		||||
basepath=$(dirname $0)/..
 | 
			
		||||
$verilator --lint-only --top-module fma16 fma16.sv
 | 
			
		||||
$verilator --lint-only --top-module fma16 fma16.v
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								pipelined/src/fma/synth
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1
									
								
								pipelined/src/fma/synth
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
make -C ../../../synthDC synth DESIGN=fma16
 | 
			
		||||
@ -54,9 +54,22 @@ module bram2p1r1w
 | 
			
		||||
	   input logic [ADDR_WIDTH-1:0]  addrB,
 | 
			
		||||
	   input logic [DATA_WIDTH-1:0]  dinB
 | 
			
		||||
	   );
 | 
			
		||||
  // Core Memory
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  // *** TODO.
 | 
			
		||||
/* -----\/----- EXCLUDED -----\/-----
 | 
			
		||||
  if(`SRAM) begin
 | 
			
		||||
    // instanciate SRAM model
 | 
			
		||||
    // need multiple SRAM instances to map into correct dimentions.
 | 
			
		||||
    // also map the byte write enables onto bit write enables.
 | 
			
		||||
  end else begin // FPGA or infered flip flop memory
 | 
			
		||||
    // Core Memory
 | 
			
		||||
  end
 | 
			
		||||
 -----/\----- EXCLUDED -----/\----- */
 | 
			
		||||
 | 
			
		||||
  logic [DATA_WIDTH-1:0] 			 RAM [(2**ADDR_WIDTH)-1:0];
 | 
			
		||||
  integer 							 i;
 | 
			
		||||
  integer                            i;
 | 
			
		||||
 | 
			
		||||
  initial begin
 | 
			
		||||
    if(PRELOAD_ENABLED)
 | 
			
		||||
@ -79,4 +92,5 @@ module bram2p1r1w
 | 
			
		||||
	  end
 | 
			
		||||
	end
 | 
			
		||||
  end
 | 
			
		||||
  
 | 
			
		||||
endmodule // bytewrite_tdp_ram_rf
 | 
			
		||||
 | 
			
		||||
@ -37,7 +37,6 @@ module adrdecs (
 | 
			
		||||
  input  logic [1:0]          Size,
 | 
			
		||||
  output logic [8:0]          SelRegions
 | 
			
		||||
);
 | 
			
		||||
  logic [3:0] clintaccesssize;
 | 
			
		||||
 | 
			
		||||
 // Determine which region of physical memory (if any) is being accessed
 | 
			
		||||
 // *** eventually uncomment Access signals
 | 
			
		||||
@ -45,8 +44,7 @@ module adrdecs (
 | 
			
		||||
  adrdec boottimdec(PhysicalAddress, `BOOTROM_BASE, `BOOTROM_RANGE, `BOOTROM_SUPPORTED, /*1'b1*/AccessRX, Size, 4'b1111, SelRegions[6]);
 | 
			
		||||
  adrdec timdec(PhysicalAddress, `RAM_BASE, `RAM_RANGE, `RAM_SUPPORTED, /*1'b1*/AccessRWX, Size, 4'b1111, SelRegions[5]);
 | 
			
		||||
 | 
			
		||||
  assign clintaccesssize = (`XLEN==64) ? 4'b1000 : 4'b0100;
 | 
			
		||||
  adrdec clintdec(PhysicalAddress, `CLINT_BASE, `CLINT_RANGE, `CLINT_SUPPORTED, AccessRW, Size, clintaccesssize, SelRegions[4]);
 | 
			
		||||
  adrdec clintdec(PhysicalAddress, `CLINT_BASE, `CLINT_RANGE, `CLINT_SUPPORTED, AccessRW, Size, 4'b1111, SelRegions[4]);
 | 
			
		||||
  adrdec gpiodec(PhysicalAddress, `GPIO_BASE, `GPIO_RANGE, `GPIO_SUPPORTED, AccessRW, Size, 4'b0100, SelRegions[3]);
 | 
			
		||||
  adrdec uartdec(PhysicalAddress, `UART_BASE, `UART_RANGE, `UART_SUPPORTED, AccessRW, Size, 4'b0001, SelRegions[2]);
 | 
			
		||||
  adrdec plicdec(PhysicalAddress, `PLIC_BASE, `PLIC_RANGE, `PLIC_SUPPORTED, AccessRW, Size, 4'b0100, SelRegions[1]);
 | 
			
		||||
 | 
			
		||||
@ -35,6 +35,7 @@ module clint (
 | 
			
		||||
  input  logic             HCLK, HRESETn, TIMECLK,
 | 
			
		||||
  input  logic             HSELCLINT,
 | 
			
		||||
  input  logic [15:0]      HADDR,
 | 
			
		||||
  input  logic [3:0]       HSIZED,
 | 
			
		||||
  input  logic             HWRITE,
 | 
			
		||||
  input  logic [`XLEN-1:0] HWDATA,
 | 
			
		||||
  input  logic             HREADY,
 | 
			
		||||
@ -50,6 +51,8 @@ module clint (
 | 
			
		||||
  logic memwrite;
 | 
			
		||||
  logic initTrans;
 | 
			
		||||
  logic [63:0] MTIMECMP;
 | 
			
		||||
  logic [`XLEN/8-1:0] ByteMaskM;
 | 
			
		||||
  integer             i;
 | 
			
		||||
 | 
			
		||||
  assign initTrans = HREADY & HSELCLINT & (HTRANS != 2'b00);
 | 
			
		||||
  // entryd and memwrite are delayed by a cycle because AHB controller waits a cycle before outputting write data
 | 
			
		||||
@ -63,6 +66,9 @@ module clint (
 | 
			
		||||
  if (`XLEN==64) assign #2 entry = {HADDR[15:3], 3'b000};
 | 
			
		||||
  else           assign #2 entry = {HADDR[15:2], 2'b00}; 
 | 
			
		||||
  
 | 
			
		||||
  swbytemask swbytemask(.HSIZED, .HADDRD(entryd[2:0]), .ByteMask(ByteMaskM));
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  // DH 2/20/21: Eventually allow MTIME to run off a separate clock
 | 
			
		||||
  // This will require synchronizing MTIME to the system clock
 | 
			
		||||
  // before it is read or compared to MTIMECMP.
 | 
			
		||||
@ -86,7 +92,11 @@ module clint (
 | 
			
		||||
        // MTIMECMP is not reset
 | 
			
		||||
      end else if (memwrite) begin
 | 
			
		||||
        if (entryd == 16'h0000) MSIP <= HWDATA[0];
 | 
			
		||||
        if (entryd == 16'h4000) MTIMECMP <= HWDATA;
 | 
			
		||||
        if (entryd == 16'h4000) begin
 | 
			
		||||
          for(i=0;i<`XLEN/8;i++)
 | 
			
		||||
            if(ByteMaskM[i])
 | 
			
		||||
              MTIMECMP[i*8 +: 8] <= HWDATA[i*8 +: 8];
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
// eventually replace MTIME logic below with timereg
 | 
			
		||||
@ -98,7 +108,9 @@ module clint (
 | 
			
		||||
        // MTIMECMP is not reset
 | 
			
		||||
      end else if (memwrite & entryd == 16'hBFF8) begin
 | 
			
		||||
        // MTIME Counter.  Eventually change this to run off separate clock.  Synchronization then needed
 | 
			
		||||
        MTIME <= HWDATA;
 | 
			
		||||
        for(i=0;i<`XLEN/8;i++)
 | 
			
		||||
          if(ByteMaskM[i])
 | 
			
		||||
            MTIME[i*8 +: 8] <= HWDATA[i*8 +: 8];
 | 
			
		||||
      end else MTIME <= MTIME + 1; 
 | 
			
		||||
  end else begin:clint // 32-bit
 | 
			
		||||
    always @(posedge HCLK) begin
 | 
			
		||||
@ -118,8 +130,14 @@ module clint (
 | 
			
		||||
        // MTIMECMP is not reset ***?
 | 
			
		||||
      end else if (memwrite) begin
 | 
			
		||||
        if (entryd == 16'h0000) MSIP <= HWDATA[0];
 | 
			
		||||
        if (entryd == 16'h4000) MTIMECMP[31:0] <= HWDATA;
 | 
			
		||||
        if (entryd == 16'h4004) MTIMECMP[63:32] <= HWDATA;
 | 
			
		||||
        if (entryd == 16'h4000) 
 | 
			
		||||
          for(i=0;i<`XLEN/8;i++)
 | 
			
		||||
            if(ByteMaskM[i])
 | 
			
		||||
              MTIMECMP[i*8 +: 8] <= HWDATA[i*8 +: 8];
 | 
			
		||||
        if (entryd == 16'h4004) 
 | 
			
		||||
          for(i=0;i<`XLEN/8;i++)
 | 
			
		||||
            if(ByteMaskM[i])
 | 
			
		||||
              MTIMECMP[32 + i*8 +: 8] <= HWDATA[i*8 +: 8];
 | 
			
		||||
        // MTIME Counter.  Eventually change this to run off separate clock.  Synchronization then needed
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
@ -130,10 +148,14 @@ module clint (
 | 
			
		||||
        MTIME <= 0;
 | 
			
		||||
        // MTIMECMP is not reset
 | 
			
		||||
      end else if (memwrite & (entryd == 16'hBFF8)) begin
 | 
			
		||||
        MTIME[31:0] <= HWDATA;
 | 
			
		||||
        for(i=0;i<`XLEN/8;i++)
 | 
			
		||||
          if(ByteMaskM[i])
 | 
			
		||||
            MTIME[i*8 +: 8] <= HWDATA[i*8 +: 8];
 | 
			
		||||
      end else if (memwrite & (entryd == 16'hBFFC)) begin
 | 
			
		||||
        // MTIME Counter.  Eventually change this to run off separate clock.  Synchronization then needed
 | 
			
		||||
        MTIME[63:32]<= HWDATA;
 | 
			
		||||
        for(i=0;i<`XLEN/8;i++)
 | 
			
		||||
          if(ByteMaskM[i])
 | 
			
		||||
            MTIME[32 + i*8 +: 8]<= HWDATA[i*8 +: 8];
 | 
			
		||||
      end else MTIME <= MTIME + 1;
 | 
			
		||||
  end 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -116,7 +116,7 @@ module uncore (
 | 
			
		||||
      clint clint(
 | 
			
		||||
        .HCLK, .HRESETn, .TIMECLK,
 | 
			
		||||
        .HSELCLINT, .HADDR(HADDR[15:0]), .HWRITE,
 | 
			
		||||
        .HWDATA, .HREADY, .HTRANS,
 | 
			
		||||
        .HWDATA, .HREADY, .HTRANS, .HSIZED,
 | 
			
		||||
        .HREADCLINT,
 | 
			
		||||
        .HRESPCLINT, .HREADYCLINT,
 | 
			
		||||
        .MTIME(MTIME_CLINT), 
 | 
			
		||||
 | 
			
		||||
@ -28,6 +28,9 @@ eval file copy -force [glob ${hdl_src}/../config/shared/*.vh] {hdl/}
 | 
			
		||||
eval file copy -force [glob ${hdl_src}/*/*.sv] {hdl/}
 | 
			
		||||
eval file copy -force [glob ${hdl_src}/*/flop/*.sv] {hdl/}
 | 
			
		||||
 | 
			
		||||
# Only for FMA class project; comment out when done
 | 
			
		||||
eval file copy -force [glob ${hdl_src}/fma/fma16.v] {hdl/}
 | 
			
		||||
 | 
			
		||||
# Enables name mapping
 | 
			
		||||
if { $saifpower == 1 } {
 | 
			
		||||
    saif_map -start
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user