mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
progress on fp-synth
This commit is contained in:
parent
06ed3a25ef
commit
9304ad8fd9
@ -1,56 +0,0 @@
|
||||
///////////////////////////////////////////
|
||||
// wallypipelinedcorewrapper.sv
|
||||
//
|
||||
// Written: Kevin Kim kekim@hmc.edu 21 August 2023
|
||||
// Modified:
|
||||
//
|
||||
// Purpose: A wrapper to set parameters. Vivado cannot set the top level parameters because it only supports verilog,
|
||||
// not system verilog.
|
||||
//
|
||||
// A component of the Wally configurable RISC-V project.
|
||||
//
|
||||
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||
//
|
||||
// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file
|
||||
// except in compliance with the License, or, at your option, the Apache License version 2.0. You
|
||||
// may obtain a copy of the License at
|
||||
//
|
||||
// https://solderpad.org/licenses/SHL-2.1/
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, any work distributed under the
|
||||
// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
// either express or implied. See the License for the specific language governing permissions
|
||||
// and limitations under the License.
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//`include "BranchPredictorType.vh"
|
||||
`include "config.vh"
|
||||
|
||||
import cvw::*;
|
||||
|
||||
`include "parameter-defs.vh"
|
||||
module wallypipelinedcorewrapper (
|
||||
input logic clk, reset,
|
||||
// Privileged
|
||||
input logic MTimerInt, MExtInt, SExtInt, MSwInt,
|
||||
input logic [63:0] MTIME_CLINT,
|
||||
// Bus Interface
|
||||
input logic [P.XLEN-1:0] HRDATA,
|
||||
input logic HREADY, HRESP,
|
||||
output logic HCLK, HRESETn,
|
||||
output logic [P.PA_BITS-1:0] HADDR,
|
||||
output logic [32-1:0] HWDATA,
|
||||
output logic [32/8-1:0] HWSTRB,
|
||||
output logic HWRITE,
|
||||
output logic [2:0] HSIZE,
|
||||
output logic [2:0] HBURST,
|
||||
output logic [3:0] HPROT,
|
||||
output logic [1:0] HTRANS,
|
||||
output logic HMASTLOCK
|
||||
);
|
||||
|
||||
wallypipelinedcore #(P) core(.*);
|
||||
|
||||
endmodule
|
@ -2,61 +2,79 @@
|
||||
|
||||
# RADIX 2
|
||||
setRADIXeq2 () {
|
||||
sed -i "157s/RADIX.*/RADIX = 32\'h2/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "157s/RADIX.*/RADIX = 32\'h2/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# K = 1
|
||||
setKeq1 () {
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h1/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h1/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# K = 2
|
||||
setKeq2 () {
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h2/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h2/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# K = 4
|
||||
setKeq4 () {
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h4/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h4/" $WALLY/config/rv32gc/config.vh
|
||||
sed -i "157s/RADIX.*/RADIX = 32\'h2;/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "157s/RADIX.*/RADIX = 32\'h2;/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# RADIX 4
|
||||
setRADIXeq4 () {
|
||||
sed -i "157s/RADIX.*/RADIX = 32\'h4/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "157s/RADIX.*/RADIX = 32\'h4/" $WALLY/config/rv32gc/config.vh
|
||||
sed -i "157s/RADIX.*/RADIX = 32\'h4;/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "157s/RADIX.*/RADIX = 32\'h4;/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# K = 1
|
||||
setKeq1 () {
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h1;/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h1;/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# K = 2
|
||||
setKeq2 () {
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h2;/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h2;/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# K = 4
|
||||
setKeq4 () {
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h4;/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "158s/DIVCOPIES.*/DIVCOPIES = 32\'h4;/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# IDIVBITS = 1
|
||||
setIDIVBITSeq1 () {
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d1/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d1/" $WALLY/config/rv32gc/config.vh
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d1/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d1/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# IDIVBITS = 2
|
||||
setIDIVBITSeq2 () {
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d2/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d2/" $WALLY/config/rv32gc/config.vh
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d2/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d2/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# IDIVBITS = 4
|
||||
setIDIVBITSeq1 () {
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d4/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32\'d4/" $WALLY/config/rv32gc/config.vh
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d4/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "80s/IDIV_BITSPERCYCLE.*/IDIV_BITSPERCYCLE = 32;\'d4/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# IDIV ON FPU
|
||||
setIDIVeq1 () {
|
||||
sed -i "81s/IDIV_ON_FPU.*/IDIV_ON_FPU = 1/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "81s/IDIV_ON_FPU.*/IDIV_ON_FPU = 1/" $WALLY/config/rv32gc/config.vh
|
||||
sed -i "81s/IDIV_ON_FPU.*/IDIV_ON_FPU = 1;/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "81s/IDIV_ON_FPU.*/IDIV_ON_FPU = 1;/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# IDIV NOT ON FPU
|
||||
setIDIVeq0 () {
|
||||
sed -i "81s/IDIV_ON_FPU.*/IDIV_ON_FPU = 0/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "81s/IDIV_ON_FPU.*/IDIV_ON_FPU = 0/" $WALLY/config/rv32gc/config.vh
|
||||
sed -i "81s/IDIV_ON_FPU.*/IDIV_ON_FPU = 0;/" $WALLY/config/rv64gc/config.vh
|
||||
sed -i "81s/IDIV_ON_FPU.*/IDIV_ON_FPU = 0;/" $WALLY/config/rv32gc/config.vh
|
||||
}
|
||||
|
||||
# Synthesize Integer Divider
|
||||
synthIntDiv () {
|
||||
|
||||
}
|
||||
|
||||
# Synthesize FP Divider Unit
|
||||
|
||||
synthFPDiv () {
|
||||
|
||||
}
|
||||
|
||||
# forms title for synthesis
|
||||
getTitle () {
|
||||
RADIX=$(sed -n "157p" $WALLY/config/rv64gc/config.vh | tail -c 3 | head -c 1)
|
||||
K=$(sed -n "158p" $WALLY/config/rv64gc/config.vh | tail -c 3 | head -c 1)
|
||||
IDIV=$(sed -n "81p" $WALLY/config/rv64gc/config.vh | tail -c 3 | head -c 1)
|
||||
IDIVBITS=$(sed -n "80p" $WALLY/config/rv64gc/config.vh | tail -c 3 | head -c 1)
|
||||
}
|
Loading…
Reference in New Issue
Block a user