Fixed memory size in configs for rv32ic and rv64ic.

Removed warning on call to $fscanf.
This commit is contained in:
Ross Thompson 2021-04-29 17:36:46 -05:00
parent 61beedf275
commit 818c0abc89
3 changed files with 8 additions and 6 deletions

View File

@ -68,8 +68,8 @@
`define BOOTTIMBASE 32'h00000000 `define BOOTTIMBASE 32'h00000000
`define BOOTTIMRANGE 32'h00003FFF `define BOOTTIMRANGE 32'h00003FFF
`define TIMBASE 32'h80000000 `define TIMBASE 32'h80000000
`define TIMRANGE 32'h0007FFFF `define TIMRANGE 32'h07FFFFFF
`define CLINTBASE 32'h02000000 `define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF `define CLINTRANGE 32'h0000FFFF
`define GPIOBASE 32'h10012000 `define GPIOBASE 32'h10012000

View File

@ -72,8 +72,8 @@
`define BOOTTIMBASE 32'h00000000 `define BOOTTIMBASE 32'h00000000
`define BOOTTIMRANGE 32'h00003FFF `define BOOTTIMRANGE 32'h00003FFF
`define TIMBASE 32'h80000000 `define TIMBASE 32'h80000000
`define TIMRANGE 32'h0007FFFF `define TIMRANGE 32'h07FFFFFF
`define CLINTBASE 32'h02000000 `define CLINTBASE 32'h02000000
`define CLINTRANGE 32'h0000FFFF `define CLINTRANGE 32'h0000FFFF
`define GPIOBASE 32'h10012000 `define GPIOBASE 32'h10012000

View File

@ -110,6 +110,8 @@ module FunctionName(reset, clk, ProgramAddrMapFile, ProgramLabelMapFile);
integer ProgramAddrMapLineCount, ProgramLabelMapLineCount; integer ProgramAddrMapLineCount, ProgramLabelMapLineCount;
longint ProgramAddrMapLine; longint ProgramAddrMapLine;
string ProgramLabelMapLine; string ProgramLabelMapLine;
integer status;
// preload // preload
// initial begin // initial begin
@ -123,7 +125,7 @@ module FunctionName(reset, clk, ProgramAddrMapFile, ProgramLabelMapFile);
// read line by line to count lines // read line by line to count lines
if (ProgramAddrMapFP) begin if (ProgramAddrMapFP) begin
while (! $feof(ProgramAddrMapFP)) begin while (! $feof(ProgramAddrMapFP)) begin
$fscanf(ProgramAddrMapFP, "%h\n", ProgramAddrMapLine); status = $fscanf(ProgramAddrMapFP, "%h\n", ProgramAddrMapLine);
ProgramAddrMapLineCount = ProgramAddrMapLineCount + 1; ProgramAddrMapLineCount = ProgramAddrMapLineCount + 1;
end end
@ -141,7 +143,7 @@ module FunctionName(reset, clk, ProgramAddrMapFile, ProgramLabelMapFile);
if (ProgramLabelMapFP) begin if (ProgramLabelMapFP) begin
while (! $feof(ProgramLabelMapFP)) begin while (! $feof(ProgramLabelMapFP)) begin
$fscanf(ProgramLabelMapFP, "%s\n", ProgramLabelMapLine); status = $fscanf(ProgramLabelMapFP, "%s\n", ProgramLabelMapLine);
ProgramLabelMapMemory[ProgramLabelMapLineCount] = ProgramLabelMapLine; ProgramLabelMapMemory[ProgramLabelMapLineCount] = ProgramLabelMapLine;
ProgramLabelMapLineCount = ProgramLabelMapLineCount + 1; ProgramLabelMapLineCount = ProgramLabelMapLineCount + 1;
end end