Skip to content

Commit 3b15922

Browse files
authoredJan 10, 2025··
Merge pull request #1 from FlyGoat/update
Bump to upstream latest
2 parents a6e8fd1 + 84808b2 commit 3b15922

File tree

9 files changed

+73
-34
lines changed

9 files changed

+73
-34
lines changed
 

‎.github/workflows/publish-to-pypi.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
with:
1717
# Always clone the full depth so git-describe works.
1818
fetch-depth: 0
@@ -70,14 +70,14 @@ jobs:
7070
runs-on: ubuntu-latest
7171

7272
steps:
73-
- uses: actions/checkout@v2
73+
- uses: actions/checkout@v4
7474
with:
7575
# Always clone the full depth so git-describe works.
7676
fetch-depth: 0
7777
submodules: true
7878

7979
- name: Set up Python 🐍 ${{ matrix.python-version }}
80-
uses: actions/setup-python@v2
80+
uses: actions/setup-python@v5
8181
with:
8282
python-version: ${{ matrix.python-version }}
8383

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ with open(data_file(my_data_file)) as f:
3131
```
3232

3333

34-
The data files come from https://github.com/cliffordwolf/picorv32
34+
The data files come from https://github.com/YosysHQ/picorv32
3535
and are imported using `git subtrees` to the directory
3636
[pythondata_cpu_picorv32/verilog](pythondata_cpu_picorv32/verilog).
3737

@@ -104,6 +104,6 @@ pythondata-cpu-picorv32
104104
# Issues and Fixes
105105

106106
This package is autogenerated from the sources in
107-
<https://github.com/cliffordwolf/picorv32>
107+
<https://github.com/YosysHQ/picorv32>
108108
using the [pythondata-auto](https://github.com/litex-hub/pythondata-auto)
109109
toolset. Pull requests and issues on this pythondata repo may not be monitored.

‎pythondata_cpu_picorv32/__init__.py

+16-19
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,42 @@
11
import os.path
22
__dir__ = os.path.split(os.path.abspath(os.path.realpath(__file__)))[0]
33
data_location = os.path.join(__dir__, "verilog")
4-
src = "https://github.com/cliffordwolf/picorv32"
4+
src = "https://github.com/YosysHQ/picorv32"
55

66
# Module version
7-
version_str = "1.0.post194"
8-
version_tuple = (1, 0, 194)
7+
version_str = "1.0.post218"
8+
version_tuple = (1, 0, 218)
99
try:
1010
from packaging.version import Version as V
11-
pversion = V("1.0.post194")
11+
pversion = V("1.0.post218")
1212
except ImportError:
1313
pass
1414

1515
# Data version info
16-
data_version_str = "1.0.post52"
17-
data_version_tuple = (1, 0, 52)
16+
data_version_str = "1.0.post70"
17+
data_version_tuple = (1, 0, 70)
1818
try:
1919
from packaging.version import Version as V
20-
pdata_version = V("1.0.post52")
20+
pdata_version = V("1.0.post70")
2121
except ImportError:
2222
pass
23-
data_git_hash = "f00a88c36eaab478b64ee27d8162e421049bcc66"
24-
data_git_describe = "v1.0-52-gf00a88c"
23+
data_git_hash = "87c89acc18994c8cf9a2311e871818e87d304568"
24+
data_git_describe = "v1.0-70-g87c89acc1899"
2525
data_git_msg = """\
26-
commit f00a88c36eaab478b64ee27d8162e421049bcc66
27-
Merge: 1d9f5b7 e8dbd9a
28-
Author: Claire Xen <claire@clairexen.net>
29-
Date: Mon Jan 3 16:03:13 2022 +0100
26+
commit 87c89acc18994c8cf9a2311e871818e87d304568
27+
Author: Miodrag Milanovic <mmicko@gmail.com>
28+
Date: Mon Jun 17 08:20:13 2024 +0200
3029
31-
Merge pull request #209 from YosysHQ/micko/cleanups
32-
33-
Cleanups
30+
clean Makefile
3431
3532
"""
3633

3734
# Tool version info
38-
tool_version_str = "0.0.post142"
39-
tool_version_tuple = (0, 0, 142)
35+
tool_version_str = "0.0.post148"
36+
tool_version_tuple = (0, 0, 148)
4037
try:
4138
from packaging.version import Version as V
42-
ptool_version = V("0.0.post142")
39+
ptool_version = V("0.0.post148")
4340
except ImportError:
4441
pass
4542

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
push:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
riscv-formal:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout picorv32.v
12+
uses: actions/checkout@v4
13+
with:
14+
sparse-checkout: |
15+
picorv32.v
16+
sparse-checkout-cone-mode: false
17+
- name: Checkout riscv-formal
18+
uses: actions/checkout@v4
19+
with:
20+
repository: YosysHQ/riscv-formal
21+
path: riscv-formal
22+
- name: cp picorv32.v
23+
run: |
24+
cp picorv32.v -t riscv-formal/cores/picorv32
25+
26+
- uses: YosysHQ/setup-oss-cad-suite@v3
27+
with:
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: make checks
31+
run: |
32+
cd riscv-formal/cores/picorv32
33+
make checks -j$(nproc)
34+
- name: make check
35+
run: |
36+
cd riscv-formal/cores/picorv32
37+
make check

‎pythondata_cpu_picorv32/verilog/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[![.github/workflows/ci.yml](https://github.com/YosysHQ/picorv32/actions/workflows/ci.yml/badge.svg)](https://github.com/YosysHQ/picorv32/actions/workflows/ci.yml)
12

23
PicoRV32 - A Size-Optimized RISC-V CPU
34
======================================
@@ -237,7 +238,9 @@ triggering an interrupt.
237238

238239
#### ENABLE_PCPI (default = 0)
239240

240-
Set this to 1 to enable the Pico Co-Processor Interface (PCPI).
241+
Set this to 1 to enable the _external_ Pico Co-Processor Interface (PCPI).
242+
The external interface is not required for the internal PCPI cores, such as
243+
`picorv32_pcpi_mul`.
241244

242245
#### ENABLE_MUL (default = 0)
243246

@@ -284,7 +287,7 @@ Support for the timer is always disabled when ENABLE_IRQ is set to 0.
284287
#### ENABLE_TRACE (default = 0)
285288

286289
Produce an execution trace using the `trace_valid` and `trace_data` output ports.
287-
For a demontration of this feature run `make test_vcd` to create a trace file
290+
For a demonstration of this feature run `make test_vcd` to create a trace file
288291
and then run `python3 showtrace.py testbench.trace firmware/firmware.elf` to decode
289292
it.
290293

@@ -735,4 +738,3 @@ See `make area` in [scripts/vivado/](scripts/vivado/).
735738
| PicoRV32 (small) | 761 | 48 | 442 |
736739
| PicoRV32 (regular) | 917 | 48 | 583 |
737740
| PicoRV32 (large) | 2019 | 88 | 1085 |
738-

‎pythondata_cpu_picorv32/verilog/firmware/start.S

-2
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,7 @@ irq_vec:
327327

328328
picorv32_retirq_insn()
329329

330-
#ifndef ENABLE_QREGS
331330
.balign 0x200
332-
#endif
333331
irq_regs:
334332
// registers are saved to this memory region during interrupt handling
335333
// the program counter is saved as register 0

‎pythondata_cpu_picorv32/verilog/picorv32.v

+8-3
Original file line numberDiff line numberDiff line change
@@ -648,11 +648,12 @@ module picorv32 #(
648648
reg instr_lb, instr_lh, instr_lw, instr_lbu, instr_lhu, instr_sb, instr_sh, instr_sw;
649649
reg instr_addi, instr_slti, instr_sltiu, instr_xori, instr_ori, instr_andi, instr_slli, instr_srli, instr_srai;
650650
reg instr_add, instr_sub, instr_sll, instr_slt, instr_sltu, instr_xor, instr_srl, instr_sra, instr_or, instr_and;
651-
reg instr_rdcycle, instr_rdcycleh, instr_rdinstr, instr_rdinstrh, instr_ecall_ebreak;
651+
reg instr_rdcycle, instr_rdcycleh, instr_rdinstr, instr_rdinstrh, instr_ecall_ebreak, instr_fence;
652652
reg instr_getq, instr_setq, instr_retirq, instr_maskirq, instr_waitirq, instr_timer;
653653
wire instr_trap;
654654

655-
reg [regindex_bits-1:0] decoded_rd, decoded_rs1, decoded_rs2;
655+
reg [regindex_bits-1:0] decoded_rd, decoded_rs1;
656+
reg [4:0] decoded_rs2;
656657
reg [31:0] decoded_imm, decoded_imm_j;
657658
reg decoder_trigger;
658659
reg decoder_trigger_q;
@@ -680,7 +681,7 @@ module picorv32 #(
680681
instr_lb, instr_lh, instr_lw, instr_lbu, instr_lhu, instr_sb, instr_sh, instr_sw,
681682
instr_addi, instr_slti, instr_sltiu, instr_xori, instr_ori, instr_andi, instr_slli, instr_srli, instr_srai,
682683
instr_add, instr_sub, instr_sll, instr_slt, instr_sltu, instr_xor, instr_srl, instr_sra, instr_or, instr_and,
683-
instr_rdcycle, instr_rdcycleh, instr_rdinstr, instr_rdinstrh,
684+
instr_rdcycle, instr_rdcycleh, instr_rdinstr, instr_rdinstrh, instr_fence,
684685
instr_getq, instr_setq, instr_retirq, instr_maskirq, instr_waitirq, instr_timer};
685686

686687
wire is_rdcycle_rdcycleh_rdinstr_rdinstrh;
@@ -746,6 +747,7 @@ module picorv32 #(
746747
if (instr_rdcycleh) new_ascii_instr = "rdcycleh";
747748
if (instr_rdinstr) new_ascii_instr = "rdinstr";
748749
if (instr_rdinstrh) new_ascii_instr = "rdinstrh";
750+
if (instr_fence) new_ascii_instr = "fence";
749751

750752
if (instr_getq) new_ascii_instr = "getq";
751753
if (instr_setq) new_ascii_instr = "setq";
@@ -1083,6 +1085,7 @@ module picorv32 #(
10831085

10841086
instr_ecall_ebreak <= ((mem_rdata_q[6:0] == 7'b1110011 && !mem_rdata_q[31:21] && !mem_rdata_q[19:7]) ||
10851087
(COMPRESSED_ISA && mem_rdata_q[15:0] == 16'h9002));
1088+
instr_fence <= (mem_rdata_q[6:0] == 7'b0001111 && !mem_rdata_q[14:12]);
10861089

10871090
instr_getq <= mem_rdata_q[6:0] == 7'b0001011 && mem_rdata_q[31:25] == 7'b0000000 && ENABLE_IRQ && ENABLE_IRQ_QREGS;
10881091
instr_setq <= mem_rdata_q[6:0] == 7'b0001011 && mem_rdata_q[31:25] == 7'b0000001 && ENABLE_IRQ && ENABLE_IRQ_QREGS;
@@ -1158,6 +1161,8 @@ module picorv32 #(
11581161
instr_sra <= 0;
11591162
instr_or <= 0;
11601163
instr_and <= 0;
1164+
1165+
instr_fence <= 0;
11611166
end
11621167
end
11631168

‎pythondata_cpu_picorv32/verilog/picosoc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ clean:
113113
rm -f testbench.vvp testbench.vcd spiflash_tb.vvp spiflash_tb.vcd
114114
rm -f hx8kdemo_fw.elf hx8kdemo_fw.hex hx8kdemo_fw.bin cmos.log
115115
rm -f icebreaker_fw.elf icebreaker_fw.hex icebreaker_fw.bin
116-
rm -f hx8kdemo.blif hx8kdemo.log hx8kdemo.asc hx8kdemo.rpt hx8kdemo.bin
116+
rm -f hx8kdemo.json hx8kdemo.log hx8kdemo.asc hx8kdemo.rpt hx8kdemo.bin
117117
rm -f hx8kdemo_syn.v hx8kdemo_syn_tb.vvp hx8kdemo_tb.vvp
118118
rm -f icebreaker.json icebreaker.log icebreaker.asc icebreaker.rpt icebreaker.bin
119119
rm -f icebreaker_syn.v icebreaker_syn_tb.vvp icebreaker_tb.vvp

‎pythondata_cpu_picorv32/verilog/scripts/cxxdemo/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CXX = $(RISCV_TOOLS_PREFIX)g++
33
CC = $(RISCV_TOOLS_PREFIX)gcc
44
AS = $(RISCV_TOOLS_PREFIX)gcc
55
CXXFLAGS = -MD -Os -Wall -std=c++11
6-
CCFLAGS = -MD -Os -Wall -std=c++11
6+
CFLAGS = -MD -Os -Wall -std=c++11
77
LDFLAGS = -Wl,--gc-sections
88
LDLIBS = -lstdc++
99

0 commit comments

Comments
 (0)
Please sign in to comment.