Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
75a8076
Update rv32v instructions to RVV v1.0
domenicw Nov 8, 2023
cb69c9d
Update riscv instruction category type with new RVV instructions
domenicw Nov 8, 2023
d63e2f7
Update vector CSR addresses and types
domenicw Nov 8, 2023
5a146c9
Remove reference to obsolete vediv vector configuration
domenicw Nov 9, 2023
bd392e3
Fix vslideup instruction constraints
domenicw Nov 9, 2023
4346f50
Change to new VMV instruction names
domenicw Nov 9, 2023
c48ff50
Clean up masked vector instruction ASM
domenicw Nov 9, 2023
d352597
Constrain set first vector instructions
domenicw Nov 9, 2023
4058336
Constrain v[z|s]ext instructions
domenicw Nov 9, 2023
cf7566b
Constrain vrgatherei16 instruction
domenicw Nov 9, 2023
5b79fae
Remove unused wd vector instr signal
domenicw Nov 9, 2023
6380a36
Remove reference to vector quad widening instructions
domenicw Nov 9, 2023
648333a
Mark v[z|s]ext instructions unsupported on mismatching LMUL/SEW
domenicw Nov 9, 2023
c546564
Constrain VMADC and VMSBC instructions
domenicw Nov 10, 2023
0789b00
Print v0 on vector mask enabled only when required
domenicw Nov 10, 2023
dd4868d
Update v0 overlap constraint for masked vector instr
domenicw Nov 10, 2023
66f91a9
Enable previously disabled instructions again
domenicw Nov 10, 2023
9d4f3c1
Enable support for Zve* and Zvfh vector extensions
domenicw Nov 10, 2023
77c69be
Remove reference to vector register hazard
domenicw Nov 13, 2023
3b7a944
Add validation of LMUL and SEW for narrowing and widening instr
domenicw Nov 13, 2023
40d2bb4
Check for valid LMUL for vrgatherei16
domenicw Nov 13, 2023
e1057f9
Cleanup vector asm creation
domenicw Nov 13, 2023
03c23f5
Cleanup vector instruction constraints
domenicw Nov 13, 2023
684e035
Cleanup vector gpr and csr initialisation
domenicw Nov 15, 2023
f2eeb81
Enable support for int/float narrowing widening instructions
domenicw Nov 16, 2023
a8457f9
Enable support for Zvfhmin vector extension
domenicw Nov 16, 2023
e9c0adc
Fix enable/disable randomisation of vector registers
domenicw Nov 16, 2023
98c6a34
Add immediate randomization for vector instr
domenicw Nov 16, 2023
b5a28f8
Enable vector instructions only support
domenicw Nov 16, 2023
2f67039
Prepare vector config for load and store instructions
domenicw Nov 17, 2023
cc6912f
Add support for all vector load and store instructions
domenicw Nov 17, 2023
43a2a66
Add vset{i}vl{i} instr to list of working vector instr
domenicw Nov 21, 2023
ac66f93
Adapt directed vector load/store test for RVV1.0
domenicw Nov 21, 2023
fbdca17
Move vfclass instruction to arithmetic group
domenicw Nov 22, 2023
943eea2
Filter out illegal load/stores for current config
domenicw Nov 22, 2023
16a1ae0
Remove support for stale vector amo extension
domenicw Nov 22, 2023
8bcdcdd
Cleanup vector instruction definition macros
domenicw Nov 22, 2023
7f0f570
Cleanup vector instr and config files
domenicw Nov 22, 2023
77a9f5b
Align vector instruction assembly formating to other instrs
domenicw Nov 22, 2023
4122f22
Take lmul into account for reserved vregs
domenicw Nov 24, 2023
9ca2a5f
Fix unsupported statements by VCS
domenicw Nov 24, 2023
3f4c276
Check that instruction is supported when inserting mixed instr
domenicw Nov 24, 2023
1569953
Fix thread pointer increment/decrement in exception routine
domenicw Nov 24, 2023
bcd59b2
Fix vector instr corner cases generating exceptions
domenicw Nov 24, 2023
619cecf
Add Zvl* extension
domenicw Nov 30, 2023
4ea83ce
Fix index generation and data page offset for vector l/s
domenicw Dec 1, 2023
b677d0d
Fix VL randomization
domenicw Dec 1, 2023
9f3cb21
Remove ELEN dependency for vector reg initialization
domenicw Dec 1, 2023
5ad96a0
Fix fractional lmul and sew legal combination
domenicw Dec 5, 2023
ab69613
Remove zvfhmin requirement for zvfh extension
domenicw Jan 30, 2024
3bb1a85
Fix mask register overlap and alignment constraint
domenicw Jan 30, 2024
1617af7
Solve VSEW before VLMUL
domenicw Jan 30, 2024
30026df
Pass vreg initialisation method as plusargs
domenicw Jan 30, 2024
592caeb
Re-seed RNG on instruction copy
domenicw Apr 19, 2024
06baeec
Add ability to exclude vector load/store instr using the unsupported_…
domenicw Jun 5, 2024
eddd62a
Add function to initialise vector gpr with random values based on lfsr
domenicw Jun 5, 2024
ed35eae
Add function to get random vector gpr that is not reserved
domenicw Jun 5, 2024
107e634
Use lfsr random index values for vector indexed loads/stores
domenicw Jun 5, 2024
8143604
Add plusarg to switch between old and new index vreg initialisation m…
domenicw Jun 5, 2024
4352468
Fix typos in instruction stream class
domenicw Jun 5, 2024
17bc1d9
[vector_cfg] Relax solve order between vtype and vl
domenicw Jun 7, 2024
31f1b2a
[vector_cfg] Add function to get flat vtype csr register state
domenicw Jun 7, 2024
ae3c89f
[vector_instr] Do not use x0 as rs2 for vsetvl
domenicw Jun 7, 2024
6883b47
[vector_instr] Cleanup code
domenicw Jun 7, 2024
7f960b6
[vector_instr] Remove vsetivli VL constraint
domenicw Jun 7, 2024
ac25fca
[mixed_instr_stream] Add insertion position argument
domenicw Jun 7, 2024
541ad8a
[random_instr_stream] Add support for vsetvl instructions interleaving
domenicw Jun 7, 2024
e514a8e
[csr_instr] Generate read/writes to vector CSRs
domenicw Jun 7, 2024
fa77aae
[csr_instr] Use csr names instead of hex vaddress for csr instructions
domenicw Jun 7, 2024
0ce9752
[vector_instr] Remove config irrelevant csr variables
domenicw Jun 7, 2024
4591412
[vector_load_store] Set vstart in directed tests
domenicw Jun 7, 2024
148b953
[instr_stream] Fix function return type warning
domenicw Jun 7, 2024
131a428
[laod_store_instr_lib] Fix comment typo
domenicw Jun 12, 2024
be8feec
[vector_load_store] Fix range of vstart
domenicw Jul 9, 2024
1a0c05b
[vector_load_store] Add plusarg to enable/disable vstart insertion
domenicw Aug 16, 2024
855eff6
[vector_instr] Fix reserved vregs constraint
domenicw Aug 20, 2024
ffbaebd
[vector_instr] Relax reduction register group alignment constraint
domenicw Sep 20, 2024
06e493b
[asm_program_gen] Flush D$ after write to tohost
domenicw Oct 2, 2024
26ab0b9
[instr_stream] Fix constraint solve for vsetvl with persistent vl case
domenicw Oct 24, 2024
1bbab63
[vector_instr] Adapt vsetvl[i] register distribution for special AVL …
domenicw Oct 24, 2024
fc1de31
[vector] Fix legality of segmented l/s on fraction lmul
domenicw Jan 29, 2025
c630f9e
[vector] Fix vsetivli setting incorrect VL
domenicw Jan 31, 2025
b7c21ff
[vector_load_store] Fix index range casting when base address at top …
domenicw Feb 3, 2025
637d13c
[priviledge] Fix sstatus.vs initialisation when booting in S-mode
domenicw Feb 24, 2025
531bbda
Add Axelera copyright notice to source header
domenicw May 7, 2025
1690b6e
64 bit EEW LFSR index register initialisation support
domenicw May 7, 2025
1596a11
Update rv64gcv testlist with new vector scenarios
domenicw May 7, 2025
2dac8fc
Update all target configs with new vector settings
domenicw May 7, 2025
b6ffdba
Fix lint warnings
domenicw May 7, 2025
a9e723b
Upgrade cache actions to v4
domenicw May 7, 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
2 changes: 1 addition & 1 deletion .github/workflows/build-spike.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
echo "cache_name=$cache_name" >> "$GITHUB_ENV"

- name: Setup cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
timeout-minutes: 60
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
echo "cache_code=${cache_code}_${{ env.CACHE_HASH }}" | tee -a "$GITHUB_ENV"

- name: Cache Code
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-code
timeout-minutes: 60
with:
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:

- name: Restore Spike cache
id: cache-spike-restore
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: |
/opt/spike
Expand All @@ -168,7 +168,7 @@ jobs:
echo "PYTHONPATH=pygen" >> $GITHUB_ENV

- name: Cache Code Restore
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
id: cache-code-restore
timeout-minutes: 60
with:
Expand Down
17 changes: 11 additions & 6 deletions src/isa/riscv_csr_instr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,25 @@ class riscv_csr_instr extends riscv_instr;
}
}

constraint csr_csrrw {
constraint csr_csrrw_c {
if (instr_name == CSRRW || instr_name == CSRRWI) {
write_csr == 1'b1;
}
}

constraint csr_csrrsc {
constraint csr_csrrsc_c {
if (instr_name == CSRRS || instr_name == CSRRC) {
(write_csr == 1'b1) || rs1 == 0;
}
}

constraint csr_csrrsci {
constraint csr_csrrsci_c {
if(instr_name == CSRRSI || instr_name == CSRRCI) {
(write_csr == 1'b1) || imm == 0;
}
}

constraint order {
constraint order_c {
// Choose a CSR before deciding whether we want to write to the CSR values. Then choose whether
// to read or write before choosing the rs1 and imm values. This ensures read-only accesses to
// read-only CSRs with similar probability to other CSR accesses and ensures a reasonable write
Expand Down Expand Up @@ -98,6 +98,7 @@ class riscv_csr_instr extends riscv_instr;

create_include_write_reg(cfg.add_csr_write, cfg.remove_csr_write, default_include_csr_write);
end else begin
allow_ro_write = 0;
// Use scratch register to avoid the side effect of modifying other privileged mode CSR.
if (cfg.init_privileged_mode == MACHINE_MODE) begin
include_reg = {MSCRATCH};
Expand All @@ -106,6 +107,10 @@ class riscv_csr_instr extends riscv_instr;
end else begin
include_reg = {USCRATCH};
end
// Add vector CSRs
if (cfg.enable_vector_extension) begin
include_reg = {include_reg, VXSAT, VXRM, VCSR, VL, VTYPE, VLENB};
end
end
endfunction : create_csr_filter

Expand Down Expand Up @@ -139,9 +144,9 @@ class riscv_csr_instr extends riscv_instr;

case(format)
I_FORMAT: // instr rd,rs1,imm
asm_str = $sformatf("%0s%0s, 0x%0x, %0s", asm_str, rd.name(), csr, get_imm());
asm_str = $sformatf("%0s%0s, %0s, %0s", asm_str, rd.name(), csr.name(), get_imm());
R_FORMAT: // instr rd,rs1,rs2
asm_str = $sformatf("%0s%0s, 0x%0x, %0s", asm_str, rd.name(), csr, rs1.name());
asm_str = $sformatf("%0s%0s, %0s, %0s", asm_str, rd.name(), csr.name(), rs1.name());
default:
`uvm_fatal(`gfn, $sformatf("Unsupported format %0s [%0s]", format.name(),
instr_name.name()))
Expand Down
6 changes: 5 additions & 1 deletion src/isa/riscv_instr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class riscv_instr extends uvm_object;
bit [4:0] imm_len;

// Operands
rand bit [11:0] csr;
rand privileged_reg_t csr;
rand riscv_reg_t rs2;
rand riscv_reg_t rs1;
rand riscv_reg_t rd;
Expand Down Expand Up @@ -236,6 +236,8 @@ class riscv_instr extends uvm_object;
end
// Shallow copy for all relevant fields, avoid using create() to improve performance
instr_h = new instr_template[name];
// Put instruction RNG in unique state
instr_h.srandom($urandom());
return instr_h;
endfunction : get_rand_instr

Expand Down Expand Up @@ -265,6 +267,8 @@ class riscv_instr extends uvm_object;
name = load_store_instr[idx];
// Shallow copy for all relevant fields, avoid using create() to improve performance
instr_h = new instr_template[name];
// Put instruction RNG in unique state
instr_h.srandom($urandom());
return instr_h;
endfunction : get_load_store_instr

Expand Down
Loading
Loading