Skip to content

Commit

Permalink
Merge pull request #76 from pulp-platform/ibex_regfile
Browse files Browse the repository at this point in the history
Fix ibex register file for FPGA
  • Loading branch information
bluewww committed Mar 31, 2022
2 parents b964907 + 3b9ff96 commit 3942747
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
14 changes: 7 additions & 7 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ dependencies:
cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", version: 1.1.1 }
fpnew: { git: "https://github.com/pulp-platform/fpnew.git", version: 0.6.6 }
jtag_pulp: { git: "https://github.com/pulp-platform/jtag_pulp.git", rev: "v0.1" }
cv32e40p: { git: "https://github.com/pulp-platform/cv32e40p.git", rev: "pulpissimo-v3.4.0-rev3"}
ibex: { git: "https://github.com/lowRISC/ibex.git", rev: "pulpissimo-v6.1.1" }
cv32e40p: { git: "https://github.com/pulp-platform/cv32e40p.git", rev: "pulpissimo-v3.4.0-rev4"}
ibex: { git: "https://github.com/pulp-platform/ibex.git", rev: "pulpissimo-v6.1.2" }
scm: { git: "https://github.com/pulp-platform/scm.git", version: 1.0.1}
generic_FLL: { git: "https://github.com/pulp-platform/generic_FLL.git", rev: "1c92dc73a940392182fd4cb7b86f35649b349595" }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.3 }
udma_core: { git: "https://github.com/pulp-platform/udma_core.git", version: 1.1.0 }
udma_uart: { git: "https://github.com/pulp-platform/udma_uart.git", version: 1.0.1 }
udma_i2c: { git: "https://github.com/pulp-platform/udma_i2c.git", version: 1.0.0 }
udma_core: { git: "https://github.com/pulp-platform/udma_core.git", version: 1.1.2 }
udma_uart: { git: "https://github.com/pulp-platform/udma_uart.git", version: 1.0.2 }
udma_i2c: { git: "https://github.com/pulp-platform/udma_i2c.git", version: 2.0.0 }
udma_i2s: { git: "https://github.com/pulp-platform/udma_i2s.git", version: 1.1.2 }
udma_qspi: { git: "https://github.com/pulp-platform/udma_qspi.git", version: 1.0.4 }
udma_sdio: { git: "https://github.com/pulp-platform/udma_sdio.git", version: 1.1.2 }
udma_camera: { git: "https://github.com/pulp-platform/udma_camera.git", version: 1.1.2 }
udma_filter: { git: "https://github.com/pulp-platform/udma_filter.git", version: 1.0.2 }
udma_external_per: { git: "https://github.com/pulp-platform/udma_external_per.git", version: 1.0.3 }
udma_filter: { git: "https://github.com/pulp-platform/udma_filter.git", version: 1.0.3 }
udma_external_per: { git: "https://github.com/pulp-platform/udma_external_per.git", version: 1.0.4 }
udma_hyper: { git: "https://github.com/pulp-platform/udma_hyper.git", rev: "83ab704f9d1c5f9e5353268c901fe95c36bcea36" }
hwpe-mac-engine: { git: "https://github.com/pulp-platform/hwpe-mac-engine.git", version: 1.3.3 }
riscv-dbg: { git: "https://github.com/pulp-platform/riscv-dbg.git", version: 0.4.1 }
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## Changed
- Update bender dependency link for udma components, ibex, cv32e40p
- Update interface for udma_i2c with unconnected `nack`
## Fixed
- Fix ibex register file for FPGA
## [3.1.1] - 2022-03-11
### Fixed
- Fix cdc reset signal for cluster
Expand Down
13 changes: 12 additions & 1 deletion rtl/fc/fc_subsystem.sv
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ module fc_subsystem #(
localparam IBEX_RV32M = CORE_TYPE == 1 ? ibex_pkg::RV32MFast : ibex_pkg::RV32MNone;
localparam IBEX_RV32E = CORE_TYPE == 2;

// Set register file for ibex based on bender targets.
// Default to FF for simulation, use FGPA for FPGA, use Latch for synthesis.
// Override by setting bender targets (`-t ibex_use_ff_regfile`) or defines below
localparam IBEX_RegFile = `ifdef TARGET_IBEX_USE_FPGA_REGFILE ibex_pkg::RegFileFPGA; `else // Override FPGA
`ifdef TARGET_IBEX_USE_LATCH_REGFILE ibex_pkg::RegFileLatch; `else // Override Latch
`ifdef TARGET_IBEX_USE_FF_REGFILE ibex_pkg::RegFileFF; `else // Override FF
`ifdef TARGET_FPGA ibex_pkg::RegFileFPGA; `else // FPGA
`ifdef TARGET_SYNTHESIS ibex_pkg::RegFileLatch; `else // Synthesis
ibex_pkg::RegFileFF; // Default
`endif `endif `endif `endif `endif

// Interrupt signals
logic core_irq_req ;
logic core_irq_sec ;
Expand Down Expand Up @@ -200,7 +211,7 @@ module fc_subsystem #(
.RV32E ( IBEX_RV32E ),
.RV32M ( IBEX_RV32M ),
.RV32B ( ibex_pkg::RV32BNone ),
.RegFile ( ibex_pkg::RegFileFF ),
.RegFile ( IBEX_RegFile ),
.BranchTargetALU ( 1'b0 ),
.WritebackStage ( 1'b0 ),
.ICache ( 1'b0 ),
Expand Down
3 changes: 2 additions & 1 deletion rtl/udma_subsystem/udma_subsystem.sv
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,6 @@ module udma_subsystem
.sys_clk_i ( s_clk_periphs_core[PER_ID_I2C+g_i2c] ),
.periph_clk_i ( s_clk_periphs_per[PER_ID_I2C+g_i2c] ),
.rstn_i ( sys_resetn_i ),
.i2c_eot_o ( s_i2c_eot[g_i2c] ),

.cfg_data_i ( s_periph_data_to ),
.cfg_addr_i ( s_periph_addr ),
Expand Down Expand Up @@ -686,6 +685,8 @@ module udma_subsystem
.data_rx_ready_i ( s_rx_ch_ready[CH_ID_RX_I2C+g_i2c] ),

.err_o ( s_i2c_evt[g_i2c] ),
.eot_o ( s_i2c_eot[g_i2c] ),
.nack_o (),

.scl_i ( i2c_scl_i[g_i2c] ),
.scl_o ( i2c_scl_o[g_i2c] ),
Expand Down

0 comments on commit 3942747

Please sign in to comment.