Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
bddc021
Add register file generator (RFGen)
Joonari Feb 26, 2024
05b40ec
tcetest_bypass.sh: Add error message when itrace not correct
Joonari Mar 11, 2024
916e020
FUGen: Fix extra parenthesis and signal default value
Joonari Mar 11, 2024
78afcd0
Fix filename used in LSU RTL generation
Joonari Mar 12, 2024
d7ebb04
FUGen: Fix verilog issues
Joonari Mar 12, 2024
2b6c723
Add verilog testbench template for the new TB generator
Joonari Mar 13, 2024
0baec96
FUGen: Use don't care ('-') as signal init value only when specified
Joonari Mar 14, 2024
f336828
WIP
Joonari Mar 15, 2024
94d907a
Remove 'unique' from verilog case statements (it's a systemverilog fe…
Joonari Mar 20, 2024
dda665b
Fix issues with verilog parameter definition
Joonari Mar 20, 2024
9ba61ce
Remove debug prints
Joonari Mar 21, 2024
6bc6e84
Fix SinglePortSSRAMBlock port width.
Joonari Mar 21, 2024
92028a1
Fix boolean parameter value in verilog HW generation
Joonari Mar 21, 2024
2e9fc43
Add clkgen.v
Joonari Mar 25, 2024
61e8375
Fix for loop in SRAM verilog model
Joonari Mar 25, 2024
c6e6126
Fix parameters in SRAM verilog model
Joonari Mar 25, 2024
f44a2a7
Fix verilog testbench template
Joonari Mar 25, 2024
240886b
Add lsu_registers.v to HDB in generate.py
Joonari Mar 25, 2024
84c6c33
Add missing reset value for rdata_r in lsu_registers.vhdl
Joonari Mar 25, 2024
ad2038d
Add parameter default values
Joonari Mar 25, 2024
8f64814
Fix port name in instantiated verilog modules
Joonari Mar 25, 2024
619dea4
Change verilog standard from 2001 to 2012 in iverilog compile script
Joonari Mar 25, 2024
bd6ba62
Remove debug prints
Joonari Mar 25, 2024
f4518cc
Multiple fixes to verilog netlist writer
Joonari Mar 25, 2024
3901369
Fix issue with execution_count_reg
Joonari Mar 25, 2024
ffe0ef8
Compile files as SystemVerilog when using modelsim
Joonari Mar 25, 2024
4340611
Remove verilog timescale definitions + TB fixes
Joonari Mar 26, 2024
be64019
FUGen: Fix constant value assignments
Joonari Mar 26, 2024
eb36d5e
Remove clkgen.v from instantiated files. Clk is generated directly in…
Joonari Mar 26, 2024
85399f2
Parameter package fixes + TB initial clk value fix to match VHDL version
Joonari Mar 26, 2024
6cd0adf
RFGen: Add guard latency 0 verilog generation
Joonari Mar 26, 2024
0e64456
Add lsu_registers.v
Joonari Mar 26, 2024
fb15fc9
Remove debug prints
Joonari Mar 26, 2024
4880e1d
Remove debug prints
Joonari Mar 28, 2024
ae5dc86
Fix systemtests' expected RTL output after chaning pkg order
Joonari Mar 28, 2024
f04b290
Remove unused argument from iverilog scripts
Joonari Apr 3, 2024
04b0a9d
Verilog testbench fixes
Joonari Apr 3, 2024
8c1d1a5
Verilog bustrace dump fix
Joonari Apr 3, 2024
a6d18a2
Add mem lock (at reset) signal to ifetch Verilog template
Joonari Apr 4, 2024
9c35e2c
Add decoder fill lock to Verilog generator
Joonari Apr 4, 2024
89c5910
Fix Verilog decoder lock signal generation
Joonari Apr 4, 2024
deb33e6
Fix RFGen system test
Joonari Apr 4, 2024
0ea74bd
Start adding FUGen Verilog tests. Bustrace mismatch.
Joonari Apr 4, 2024
9a2345b
Fix conditional bash statement
Joonari Apr 5, 2024
5f6451f
Change RISC-V test RF dump expected output
Joonari Apr 5, 2024
061b5df
Start cycle count from -1 in Verilog IC due to different behaviour to…
Joonari Apr 5, 2024
cf85473
Add mem init (in simulation) to synch_byte_mask_sram
Joonari Apr 5, 2024
43c12c7
Verilog simulation: Add PERIOD to SIMTIME to match number of exec. cy…
Joonari Apr 5, 2024
759d819
Fix defaults.v
Joonari Apr 8, 2024
effb7a2
Fix FUGen Verilog sign extension
Joonari Apr 8, 2024
1cf698c
Add FUGen Verilog tests. Failing tests commented out!
Joonari Apr 8, 2024
dd1f810
Add missing IDF file
Joonari Jan 20, 2025
6171517
Add parameter for max. num. processes when running system tests
Joonari Jan 31, 2025
c55ce34
Move missing RFGen files during install
karihepola Jun 5, 2024
6f9da4d
Fix simulator warnings with rotation operations
karihepola Jun 5, 2024
8a5ed50
FUGen: Change ordering of suboperation result assignment so that they…
karihepola Jul 25, 2024
9befafe
FUGen: Fix width inspection for dag output
karihepola Jul 25, 2024
edaa9ac
More fixes for FUGen Verilog output
karihepola Aug 5, 2024
8761c83
Fix subop signal connections in FUGen
karihepola Apr 24, 2024
b24b76c
Enable FUGen test that now passes
Joonari Feb 13, 2025
31252ec
Add option to manually run CI workflows
Joonari Jan 27, 2025
28e85f5
Remove now useless connection map
Joonari Feb 13, 2025
b85ff06
Add test generator (TeGe)
Joonari Feb 14, 2025
c581faa
Remove file suffix from an operation name in generate_base32.hdb
Joonari Mar 10, 2025
8f5f591
Update testrunner.py for python 3 instead of 2
Joonari Mar 14, 2025
bf22f27
Install iverilog in github workflow
Joonari Mar 26, 2025
a77aaf6
Reduce mem sizes in ADFs to avoid excessive simulation memory usage
Joonari Mar 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -60,7 +61,8 @@ jobs:
cmake \
graphviz \
bc \
ghdl
ghdl \
iverilog

- name:
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ openasip/scripts/tce-selftest
openasip/src/applibs/LLVMBackend/passes/.dirstamp
openasip/src/applibs/LLVMBackend/passes/buildllvmpass
openasip/src/bintools/Assembler/tceasm
openasip/src/bintools/TestGenerator/generatetests
openasip/src/bintools/BEMGenerator/createbem
openasip/src/bintools/BEMViewer/viewbem
openasip/src/bintools/BlocksDisassembler/tpef2pasm
Expand Down
2 changes: 2 additions & 0 deletions openasip/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,7 @@ AC_CONFIG_FILES([
src/bintools/BEMViewer/Makefile
src/bintools/Assembler/Makefile
src/bintools/Disassembler/Makefile
src/bintools/TestGenerator/Makefile
src/bintools/BlocksTranslator/Makefile
src/bintools/BlocksDisassembler/Makefile
src/applibs/Scheduler/Selector/Makefile
Expand Down Expand Up @@ -1425,6 +1426,7 @@ AC_CONFIG_FILES([
src/applibs/EPSGenerator/Makefile
src/applibs/costdb/Makefile
src/applibs/program/Makefile
src/applibs/TestGenerator/Makefile
src/codesign/Estimator/Makefile
src/procgen/HDB/Makefile
src/procgen/ProGe/Makefile
Expand Down
5 changes: 4 additions & 1 deletion openasip/data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ nobase_data_DATA = $(srcdir)/ProDe/confschema.xsd \
$(srcdir)/ProGe/debugger/*.vhdl.tmpl \
$(srcdir)/ProGe/*.snippet \
$(srcdir)/ProGe/debugger/tb/*.vhdl \
$(srcdir)/riscv/*
$(srcdir)/riscv/* \
$(srcdir)/RFGen/vhdl/*.vhdl \
$(srcdir)/RFGen/verilog/*.v


EXTRA_DIST = ${nobase_data_DATA}
8 changes: 4 additions & 4 deletions openasip/data/ProGe/idecompressor.v.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
// 2012-04-04 1.0 Vinogradov
//////////////////////////////////////////////////////////////////////////////

`timescale 10ns/1ns
module ENTITY_STR_decompressor
#(
`include "ENTITY_STR_globals_pkg.vh"
,
#(
`include "ENTITY_STR_imem_mau_pkg.vh"
,
`include "ENTITY_STR_globals_pkg.vh"

)
(
output fetch_en,
Expand Down
34 changes: 18 additions & 16 deletions openasip/data/ProGe/ifetch.v.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@
// 2012-04-04 1.0 Vinogradov
//////////////////////////////////////////////////////////////////////////////

`timescale 10ns/1ns
module ENTITY_STR_ifetch
#(
`include "ENTITY_STR_imem_mau_pkg.vh"
,
`include "ENTITY_STR_globals_pkg.vh"
,
`include "gcu_opcodes_pkg.vh"
,
`include "ENTITY_STR_imem_mau_pkg.vh"
)
(
// program counter in
Expand Down Expand Up @@ -76,6 +75,7 @@ module ENTITY_STR_ifetch

integer reset_cntr;
reg reset_lock;
reg mem_en_lock_r;

parameter IFETCH_DELAY=1;

Expand All @@ -89,28 +89,30 @@ module ENTITY_STR_ifetch
assign ra_out= return_addr_reg;
assign fetchblock = instruction_reg;

assign lock = ~fetch_en | busy;
assign lock = ~fetch_en | busy | mem_en_lock_r;

always@(posedge clk or negedge rstx)
if(~rstx)
begin
if (~rstx) begin
mem_en_lock_r <= '1;
end else begin
mem_en_lock_r <= '0;
end

always@(posedge clk or negedge rstx)
if (~rstx) begin
pc_reg <= 0;
pc_prev_reg <= {IMEMADDRWIDTH{1'b0}};
return_addr_reg <= {IMEMADDRWIDTH{1'b0}};
instruction_reg <= {IMEMWIDTHINMAUS*IMEMMAUWIDTH{1'b0}};
reset_cntr <= 0;
reset_lock <= 1'b1;
end
else
begin
if( fetch_en && ~lock)
begin
end else begin
if (fetch_en && ~lock) begin
pc_reg <= next_pc;
pc_prev_reg <= pc_reg;
end

if(~lock)
begin
if (~lock) begin
if( reset_cntr < IFETCH_DELAY )
reset_cntr <= reset_cntr + 1;
else
Expand All @@ -124,7 +126,7 @@ module ENTITY_STR_ifetch
if(ra_load)
return_addr_reg <= ra_in;
else
if(pc_load && pc_opcode==IFE_CALL)
if (pc_load && pc_opcode==IFE_CALL)
// return address transformed to same form as all others addresses
// provided as input
return_addr_reg <= increased_pc;
Expand All @@ -134,9 +136,9 @@ module ENTITY_STR_ifetch
assign increased_pc = pc_reg + IMEMWIDTHINMAUS;

always@(*)
if(pc_load)
if (pc_load)
next_pc = pc_in;
else// no branch
else // no branch
next_pc = increased_pc;

endmodule
64 changes: 64 additions & 0 deletions openasip/data/ProGe/tb/clkgen.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright (c) 2002-2024 Tampere University.
//
// This file is part of TTA-Based Codesign Environment (TCE).
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//////////////////////////////////////////////////////////////////////////////-
// Title : Clock generator
//////////////////////////////////////////////////////////////////////////////-
// File : clkgen.v
// Author : Joonas Multanen <[email protected]>
// Company :
// Created : 2024-03-22
// Last update: 2024-03-22
//////////////////////////////////////////////////////////////////////////////-
// Description: A 50/50 testbench clock. The clock period is defined by
// a generic PERIOD
//////////////////////////////////////////////////////////////////////////////-
// Revisions :
// Date Version Author Description
// 2024-03-22 1.0 multanej Created
//////////////////////////////////////////////////////////////////////////////-

module clkgen
#(
parameter PERIOD = 10
)
(
output wire clk,
input wire en
);

reg clk_internal;

initial begin
clk_internal <= 0;
end

always begin
if (en) begin
#(PERIOD) clk_internal <= ~clk_internal;
end else begin
clk_internal <= 0;
end
end

assign clk = clk_internal;

endmodule // clkgen
1 change: 0 additions & 1 deletion openasip/data/ProGe/tb/imem_arbiter.v
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// Revisions :
// 2012-04-04 1.0 Vinogradov
//////////////////////////////////////////////////////////////////////////////
`timescale 10ns/1ns

module imem_arbiter
#(
Expand Down
1 change: 0 additions & 1 deletion openasip/data/ProGe/tb/legacy_testbench.v.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
// Revisions :
// 2012-04-04 1.0 Vinogradov
//////////////////////////////////////////////////////////////////////////////
`timescale 1ns/1ns

module testbench
#(
Expand Down
1 change: 0 additions & 1 deletion openasip/data/ProGe/tb/mem_arbiter.v
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// Revisions :
// 2012-04-04 1.0 Vinogradov
//////////////////////////////////////////////////////////////////////////////
`timescale 10ns/1ns

module mem_arbiter
#(
Expand Down
79 changes: 79 additions & 0 deletions openasip/data/ProGe/tb/synch_byte_mask_sram.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
module synch_byte_mask_sram #(parameter
// pragma translate_off
init = 1,
INITFILENAME = "ram_init",
trace = 1,
TRACEFILENAME = "dpram_trace",
trace_mode = 0,
access_trace = 1,
ACCESSTRACEFILENAME = "access_trace",
// pragma translate_on
DATAW = 32,
ADDRW = 7)
(
input wire clk,
input wire [DATAW-1:0] adata,
input wire [ADDRW-1:0] aaddr,
input wire avalid,
input wire awren,
input wire [(DATAW/8)-1:0] astrb,
output wire aready,
output wire rvalid,
input wire rready,
output wire [DATAW-1:0] rdata
);

parameter DW = DATAW;
parameter AW = ADDRW;
parameter DW8 = DW / 8;

reg [DW-1:0] mem_r [0:2**AW-1];
reg [DW-1:0] q_r;
reg [DW-1:0] wr_mask;

integer line;

integer k;

//this initial path can be synthesize by quartus
initial
if(init)
if(INITFILENAME!="")
begin
$readmemb(INITFILENAME,mem_r);
$display("Memory initialized from file %s",INITFILENAME);
end
else
begin
for(k=0; k<2**ADDRW; k=k+1)
mem_r[k]={DATAW{1'b0}};
$display("Memory initialized to zeroes!");
end


assign line = aaddr;

always @(posedge clk) begin
if (avalid && awren) begin
mem_r[line] <= (adata & wr_mask) | (mem_r[line] & ~wr_mask);
q_r <= (adata & wr_mask) | (mem_r[line] & ~wr_mask);
end else if (avalid) begin
q_r <= mem_r[line];
end
end

integer i,j;
always @* begin
wr_mask = 0;
for (i = 0; i < DW8; i = i + 1) begin
for (j = i * 8; j < i * 8 + 8; j = j + 1) begin
wr_mask[j] = astrb[i];
end
end
end

assign rdata = q_r;
assign rvalid = 1;
assign aready = 1;

endmodule
1 change: 0 additions & 1 deletion openasip/data/ProGe/tb/synch_dualport_sram.v
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// 2012-04-04 1.0 Vinogradov
//////////////////////////////////////////////////////////////////////////////

`timescale 10ns/1ns

module synch_dualport_sram
#(
Expand Down
9 changes: 5 additions & 4 deletions openasip/data/ProGe/tb/synch_sram.v
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@
// Revisions :
// 2012-04-04 1.0 Vinogradov
//////////////////////////////////////////////////////////////////////////////
`timescale 10ns/1ns

module synch_sram
#(
parameter init =1,
parameter INITFILENAME ="ram_init",
parameter trace =1,
parameter init = 1,
parameter INITFILENAME = "ram_init",
parameter trace = 1,
parameter TRACEFILENAME = "dpram_trace",
// trace_mode 0: hex, trace_mode 1: integer, trace_mode 2: unsigned
parameter trace_mode = 0,
parameter access_trace = 1,
parameter ACCESSTRACEFILENAME = "access_trace",
parameter DATAW = 32,
parameter ADDRW = 7
)
Expand Down
Loading