Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Increase ICCM size to 256 KB #1896

Open
wants to merge 1 commit into
base: main-2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 drivers/src/memory_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub const LAST_REGION_END: u32 = NSTACK_ORG + NSTACK_SIZE;
pub const ROM_RELAXATION_PADDING: u32 = 4 * 1024;
pub const ROM_SIZE: u32 = 96 * 1024;
pub const MBOX_SIZE: u32 = 128 * 1024;
pub const ICCM_SIZE: u32 = 128 * 1024;
pub const ICCM_SIZE: u32 = 256 * 1024;
pub const DCCM_SIZE: u32 = 256 * 1024;
pub const ROM_DATA_SIZE: u32 = 996;
pub const MAN1_SIZE: u32 = 17 * 1024;
Expand Down
2 changes: 1 addition & 1 deletion hw-model/tests/model_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ fn test_uninitialized_iccm_read() {
);

const ICCM_ADDR: u32 = 0x4000_0000;
const ICCM_SIZE: u32 = 128 * 1024;
const ICCM_SIZE: u32 = 256 * 1024;

model.soc_ifc().cptra_rsvd_reg().at(0).write(|_| ICCM_ADDR);
model.soc_ifc().cptra_rsvd_reg().at(1).write(|_| ICCM_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion rom/dev/src/rom.ld
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CFI_STATE_ORG = 0x500003E4;
*/
ROM_RELAXATION_PADDING = 8k;
ROM_SIZE = 96K;
ICCM_SIZE = 128K;
ICCM_SIZE = 256K;
DCCM_SIZE = 256K;
DATA_SIZE = 996;
STACK_SIZE = 61K;
Expand Down
4 changes: 2 additions & 2 deletions rom/dev/tests/rom_integration_tests/rv32_unit_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ fn test_asm() {
let mut hw = caliptra_hw_model::new(
InitParams {
rom: &rom,
iccm: &vec![0x55u8; 128 * 1024],
dccm: &vec![0x66u8; 128 * 1024],
iccm: &vec![0x55u8; 256 * 1024],
dccm: &vec![0x66u8; 256 * 1024],
..Default::default()
},
BootParams::default(),
Expand Down
2 changes: 1 addition & 1 deletion sw-emulator/lib/cpu/src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub struct CoverageBitmaps<'a> {
pub iccm: &'a bit_vec::BitVec,
}

const ICCM_SIZE: usize = 128 * 1024;
const ICCM_SIZE: usize = 256 * 1024;
const ICCM_ORG: usize = 0x40000000;
const ICCM_UPPER: usize = ICCM_ORG + ICCM_SIZE - 1;

Expand Down
2 changes: 1 addition & 1 deletion sw-emulator/lib/periph/src/iccm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use std::{cell::RefCell, rc::Rc};
pub struct Iccm {
iccm: Rc<IccmImpl>,
}
const ICCM_SIZE_BYTES: usize = 128 * 1024;
const ICCM_SIZE_BYTES: usize = 256 * 1024;

impl Iccm {
pub fn lock(&mut self) {
Expand Down
2 changes: 1 addition & 1 deletion sw-emulator/lib/periph/src/root_bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ pub struct CaliptraRootBus {

impl CaliptraRootBus {
pub const ROM_SIZE: usize = 96 * 1024;
pub const ICCM_SIZE: usize = 128 * 1024;
pub const ICCM_SIZE: usize = 256 * 1024;
pub const DCCM_SIZE: usize = 256 * 1024;

pub fn new(clock: &Clock, mut args: CaliptraRootBusArgs) -> Self {
Expand Down