repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/model_emulated.rs | hw-model/src/model_emulated.rs | // Licensed under the Apache-2.0 license
use std::cell::Cell;
use std::collections::hash_map::DefaultHasher;
use std::error::Error;
use std::hash::Hasher;
use std::io::Write;
use std::path::PathBuf;
use std::rc::Rc;
use std::sync::mpsc;
use caliptra_api::soc_mgr::SocManager;
use caliptra_api_types::Fuses;
use caliptr... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/keys.rs | hw-model/src/keys.rs | // Licensed under the Apache-2.0 license
#![allow(dead_code)]
use crate::otp_provision::{LifecycleRawTokens, LifecycleToken, ManufDebugUnlockToken};
// This is a random number, but should be kept in sync with what is the default value in the FPGA ROM.
pub const DEFAULT_LIFECYCLE_RAW_TOKEN: LifecycleToken =
Lifec... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/mmio.rs | hw-model/src/mmio.rs | // Licensed under the Apache-2.0 license
use std::cell::Cell;
use crate::rv32_builder::Rv32Builder;
unsafe fn transmute_to_u32<T>(src: &T) -> u32 {
match std::mem::size_of::<T>() {
1 => std::mem::transmute_copy::<T, u8>(src).into(),
2 => std::mem::transmute_copy::<T, u16>(src).into(),
4 =... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/lcc.rs | hw-model/src/lcc.rs | // Licensed under the Apache-2.0 license
use bitflags::bitflags;
use crate::jtag::JtagAccessibleReg;
#[derive(Clone, Copy, Debug)]
#[repr(u32)]
pub enum LcCtrlReg {
AlertTest = 0x0,
Status = 0x4,
ClaimTransitionIfRegwen = 0x8,
ClaimTransitionIf = 0xC,
TransitionRegwen = 0x10,
TransitionCmd = ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/bin/fpga_realtime_mbox_pauser.rs | hw-model/src/bin/fpga_realtime_mbox_pauser.rs | // Licensed under the Apache-2.0 license
use caliptra_hw_model::{mmio::Rv32GenMmio, HwModel, InitParams};
use nix::sys::signal;
use nix::sys::signal::{SaFlags, SigAction, SigHandler, SigSet};
use std::process::exit;
use std::sync::atomic::{AtomicBool, Ordering};
use std::thread;
use std::time::Duration;
use caliptra_... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/openocd/openocd_jtag_tap.rs | hw-model/src/openocd/openocd_jtag_tap.rs | // Licensed under the Apache-2.0 license
//
// Derived from OpenTitan's opentitanlib with original copyright:
//
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#![allow(dead_code)]
use std::path:... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/openocd/printer.rs | hw-model/src/openocd/printer.rs | // Licensed under the Apache-2.0 license
//
// Derived from OpenTitan's opentitanlib with original copyright:
//
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
use std::io::Read;
use std::sync::{A... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/openocd/mod.rs | hw-model/src/openocd/mod.rs | // Licensed under the Apache-2.0 license
pub mod openocd_jtag_tap;
pub mod openocd_server;
pub mod printer;
| rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/openocd/openocd_server.rs | hw-model/src/openocd/openocd_server.rs | // Licensed under the Apache-2.0 license
//
// Derived from OpenTitan's opentitanlib with original copyright:
//
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
use std::io::{BufRead, BufReader, Wr... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/xi3c/controller.rs | hw-model/src/xi3c/controller.rs | // Licensed under the Apache-2.0 license
// This code was originally translated from the Xilinx I3C C driver:
// https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/i3c/src
// Which is:
// Copyright (C) 2024 Advanced Micro Devices, Inc. All Rights Reserved
// SPDX-License-Identifier: MIT
#![... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/src/xi3c/mod.rs | hw-model/src/xi3c/mod.rs | // Licensed under the Apache-2.0 license
//! This is a driver for the Xilinx AXI I3C controller that is used in Xilinx
//! FPGAs for testing.
//!
//! Documentation for the underlying hardware is available at
//! https://docs.amd.com/r/en-US/pg439-axi-i3c/.
mod controller;
pub use controller::{Ccc, Command, Config, C... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/tests/model_tests.rs | hw-model/tests/model_tests.rs | // Licensed under the Apache-2.0 license
use caliptra_api::SocManager;
use caliptra_builder::firmware;
use caliptra_hw_model::{BootParams, DefaultHwModel, HwModel, InitParams};
use caliptra_hw_model_types::ErrorInjectionMode;
use caliptra_test_harness_types as harness;
#[cfg(feature = "fpga_realtime")]
use std::proce... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/mailbox_responder.rs | hw-model/test-fw/mailbox_responder.rs | // Licensed under the Apache-2.0 license
//! A very simple program that responds to the mailbox.
#![no_main]
#![no_std]
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness;
use caliptra_drivers::cprint;
use caliptra_registers::{self, mbox::MboxCsr, sha512_acc::Sha512AccCsr, soc_ifc::SocIfc... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_dccm_double_bit_ecc.rs | hw-model/test-fw/test_dccm_double_bit_ecc.rs | // Licensed under the Apache-2.0 license
#![no_main]
#![no_std]
use ::core::arch::global_asm;
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness;
#[panic_handler]
pub fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
global_asm!(
r#"
main:
lui t0, 0x50000
li t2, ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_iccm_unaligned_write.rs | hw-model/test-fw/test_iccm_unaligned_write.rs | // Licensed under the Apache-2.0 license
#![no_main]
#![no_std]
use ::core::arch::global_asm;
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness;
#[panic_handler]
pub fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
global_asm!(
r#"
main:
lui t0, 0x40000
sw x0, 1... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_write_to_rom.rs | hw-model/test-fw/test_write_to_rom.rs | // Licensed under the Apache-2.0 license
//! A very simple program to test the behavior of the CPU when trying to write to ROM.
#![no_main]
#![no_std]
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness::println;
#[panic_handler]
pub fn panic(_info: &core::panic::PanicInfo) -> ! {
loop... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_zbb.rs | hw-model/test-fw/test_zbb.rs | // Licensed under the Apache-2.0 license
//! Basic test for the zbb extensions
#![no_main]
#![no_std]
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness;
use caliptra_registers::{self, soc_ifc::SocIfcReg};
use core::arch::asm;
#[panic_handler]
pub fn panic(_info: &core::panic::PanicInfo... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_uninitialized_read.rs | hw-model/test-fw/test_uninitialized_read.rs | // Licensed under the Apache-2.0 license
#![no_main]
#![no_std]
use caliptra_registers::{self, mbox::MboxCsr, soc_ifc::SocIfcReg};
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness;
#[panic_handler]
pub fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
#[no_mangle]
extern "C... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/mcu_hitless_update_flow.rs | hw-model/test-fw/mcu_hitless_update_flow.rs | // Licensed under the Apache-2.0 license
//! A very simple program that tests all of the steps in the MCU hitless update
//! flow. This needs to be paired with a test rom in the MCU repo to manipulate
//! the MCU side of the flow.
#![no_main]
#![no_std]
// Needed to bring in startup code
#[allow(unused)]
use caliptr... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_iccm_double_bit_ecc.rs | hw-model/test-fw/test_iccm_double_bit_ecc.rs | // Licensed under the Apache-2.0 license
#![no_main]
#![no_std]
use ::core::arch::global_asm;
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness;
#[panic_handler]
pub fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
global_asm!(
r#"
main:
lui t0, 0x40000
lui t1, ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/build.rs | hw-model/test-fw/build.rs | // Licensed under the Apache-2.0 license
fn main() {
println!("cargo:rerun-if-changed=../../test-harness/scripts/rom.ld");
println!("cargo:rustc-link-arg=-Ttest-harness/scripts/rom.ld");
}
| rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_invalid_instruction.rs | hw-model/test-fw/test_invalid_instruction.rs | // Licensed under the Apache-2.0 license
#![no_main]
#![no_std]
use ::core::arch::global_asm;
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness;
#[panic_handler]
pub fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
global_asm!(
r#"
main:
C.UNIMP
nop
nop
... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/mailbox_sender.rs | hw-model/test-fw/mailbox_sender.rs | // Licensed under the Apache-2.0 license
//! A very simple program that sends mailbox transactions.
#![no_main]
#![no_std]
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness::println;
use caliptra_registers::mbox::MboxCsr;
use caliptra_registers::soc_ifc::SocIfcReg;
use caliptra_registers... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_iccm_byte_write.rs | hw-model/test-fw/test_iccm_byte_write.rs | // Licensed under the Apache-2.0 license
#![no_main]
#![no_std]
use ::core::arch::global_asm;
// Needed to bring in startup code
#[allow(unused)]
use caliptra_test_harness;
#[panic_handler]
pub fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
global_asm!(
r#"
main:
lui t0, 0x40000
sb x0, 0... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_iccm_write_locked.rs | hw-model/test-fw/test_iccm_write_locked.rs | // Licensed under the Apache-2.0 license
//! A very simple program that sends mailbox transactions.
#![no_main]
#![no_std]
// Needed to bring in startup code
use caliptra_registers::soc_ifc::SocIfcReg;
#[allow(unused)]
use caliptra_test_harness::println;
#[panic_handler]
pub fn panic(_info: &core::panic::PanicInfo)... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/test-fw/test_pcr_extend.rs | hw-model/test-fw/test_pcr_extend.rs | // Licensed under the Apache-2.0 license
//! A very simple program that extends to a PCR and then computes a hash.
#![no_main]
#![no_std]
use caliptra_cfi_lib::CfiCounter;
use caliptra_drivers::{Array4x12, PcrBank, PcrId, Sha2_512_384};
use caliptra_registers::{pv::PvReg, sha512::Sha512Reg};
#[allow(unused)]
use cal... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/c-binding/build.rs | hw-model/c-binding/build.rs | // Licensed under the Apache-2.0 license
extern crate cbindgen;
use std::path::PathBuf;
use std::{env, str::FromStr};
fn main() {
// Get Crate dir
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
// Generate Config
let config = cbindgen::Config {
header: Some(String::from_str("// Lic... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/c-binding/src/lib.rs | hw-model/c-binding/src/lib.rs | // Licensed under the Apache-2.0 license
pub mod caliptra_model;
| rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/c-binding/src/caliptra_model.rs | hw-model/c-binding/src/caliptra_model.rs | // Licensed under the Apache-2.0 license
use caliptra_api::soc_mgr::SocManager;
use caliptra_cfi_lib::CfiState;
use caliptra_emu_bus::Bus;
use caliptra_emu_periph::MailboxRequester;
use caliptra_emu_types::RvSize;
use caliptra_hw_model::{DefaultHwModel, HwModel, InitParams, SecurityState};
use caliptra_hw_model_types:... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/hw-model/types/src/lib.rs | hw-model/types/src/lib.rs | // Licensed under the Apache-2.0 license
use caliptra_api_types::{self};
use std::array;
pub use caliptra_api_types::DeviceLifecycle;
use rand::{
rngs::{StdRng, ThreadRng},
RngCore, SeedableRng,
};
// Rationale behind this choice
//
// * The constant should be easily recognizable in waveforms and debug logs
... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/lexer.rs | systemrdl/src/lexer.rs | /*++
Licensed under the Apache-2.0 license.
--*/
use std::str::{Chars, FromStr};
use crate::{token::Token, Bits};
pub type Span = std::ops::Range<usize>;
pub struct Lexer<'a> {
start_ptr: *const u8,
token_start_ptr: *const u8,
iter: std::str::Chars<'a>,
}
impl<'a> Lexer<'a> {
pub fn new(s: &'a str) ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/lib.rs | systemrdl/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
--*/
//! General-purpose parser for systemrdl files.
//!
//! Not yet implemented:
//! - dynamic assignment
//! - instance parameters
//!
//! Examples
//!
//! ```no_run
//! use caliptra_systemrdl::{ComponentType, EnumReference, FileSource, FsFileSource, InstanceRef, Scope, Sc... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/value.rs | systemrdl/src/value.rs | /*++
Licensed under the Apache-2.0 license.
--*/
use crate::{
scope::{lookup_parameter_of_type, ParameterScope},
token::Token,
token_iter::TokenIter,
Bits, RdlError, Result,
};
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Value {
U64(u64),
Bool(bool),
Bits(Bits),
String(String),
... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/bits.rs | systemrdl/src/bits.rs | /*++
Licensed under the Apache-2.0 license.
--*/
use std::{fmt::Display, str::FromStr};
fn mask(w: u64) -> Result<u64, ()> {
if w > 64 {
return Err(());
}
if w == 64 {
return Ok(0xffff_ffff_ffff_ffff);
}
Ok((1 << w) - 1)
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct Bi... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/error.rs | systemrdl/src/error.rs | /*++
Licensed under the Apache-2.0 license.
--*/
use std::{error::Error, fmt::Display};
use crate::{token::Token, value::PropertyType, ComponentType, Value};
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum RdlError<'a> {
UnexpectedToken(Token<'a>),
UnknownIdentifier(&'a str),
DuplicateInstanceName(String)... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/scope.rs | systemrdl/src/scope.rs | /*++
Licensed under the Apache-2.0 license.
--*/
use std::collections::HashMap;
use std::path::PathBuf;
use crate::component_meta::PropertyMeta;
use crate::file_source::FileSource;
use crate::value::{
AddressingType, ComponentType, InterruptType, PropertyType, Reference, ScopeType,
};
use crate::ParseError;
use c... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/file_source.rs | systemrdl/src/file_source.rs | // Licensed under the Apache-2.0 license
use crate::string_arena::StringArena;
use std::{cell::RefCell, path::Path};
#[cfg(test)]
use std::{
collections::HashMap,
io::{Error, ErrorKind},
path::PathBuf,
};
pub trait FileSource {
fn read_to_string(&self, path: &Path) -> std::io::Result<&str>;
}
#[deri... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/token_iter.rs | systemrdl/src/token_iter.rs | /*++
Licensed under the Apache-2.0 license.
--*/
use std::collections::VecDeque;
use std::path::{Path, PathBuf};
use crate::file_source::FileSource;
use crate::lexer::{Lexer, Span};
use crate::token::Token;
use crate::value::parse_str_literal;
use crate::{Bits, RdlError, Result};
struct IncludeStackEntry<'a> {
l... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/string_arena.rs | systemrdl/src/string_arena.rs | // Licensed under the Apache-2.0 license
use std::collections::HashSet;
// TODO: Consider using elsa/FrozenVec to remove unsafe code
#[derive(Default)]
pub struct StringArena {
// SAFETY: To maintain soundness, strings in this HashSet MUST NOT be removed or mutated.
strings: std::cell::RefCell<HashSet<String>... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/component_meta.rs | systemrdl/src/component_meta.rs | /*++
Licensed under the Apache-2.0 license.
--*/
use crate::value::{ComponentType, PropertyType, ScopeType};
use crate::{RdlError, Result};
#[derive(Debug)]
pub struct PropertyMeta {
pub name: &'static str,
pub ty: PropertyType,
}
pub struct ComponentMeta {
ty: ComponentType,
pub can_instantiate: boo... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/token.rs | systemrdl/src/token.rs | /*++
Licensed under the Apache-2.0 license.
--*/
use crate::Bits;
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Token<'a> {
Field,
External,
Reg,
RegFile,
AddrMap,
Signal,
Enum,
Mem,
Constraint,
BraceOpen,
BraceClose,
BracketOpen,
BracketClose,
ParenOpen,
... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/systemrdl/src/bin/parse.rs | systemrdl/src/bin/parse.rs | /*++
Licensed under the Apache-2.0 license.
--*/
use std::fmt::Write;
use std::{error::Error, path::PathBuf};
use caliptra_systemrdl::{ComponentType, EnumReference, FsFileSource, InstanceRef, ScopeType};
fn dimension_suffix(dimensions: &[u64]) -> String {
let mut result = String::new();
for dimension in dime... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/verify/src/lib.rs | image/verify/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
Caliptra Image Verification library.
--*/
#![cfg_attr(not(feature = "std"), no_std)]
mod verifier;
use caliptra_drivers::*;
use caliptra_image_types::*;
use core::ops::Range;
pub use verifier::ImageVerifier;
pub const MAX_FIRMWARE_... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/verify/src/verifier.rs | image/verify/src/verifier.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
verifier.rs
Abstract:
This file is the main implementation of Caliptra Image Verifier.
--*/
use core::num::NonZeroU32;
use crate::*;
#[cfg(all(not(test), not(feature = "no-cfi")))]
use caliptra_cfi_derive::cfi_impl_fn;
use caliptra_cfi_lib::{
cf... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/verify/fuzz/src/fuzz_target_common.rs | image/verify/fuzz/src/fuzz_target_common.rs | // Licensed under the Apache-2.0 license
#[cfg(not(feature = "struct-aware"))]
use std::mem::size_of;
use caliptra_common::memory_layout::*;
use caliptra_drivers::*;
use caliptra_image_types::*;
use caliptra_image_verify::*;
use core::ops::Range;
#[cfg(feature = "struct-aware")]
const IMAGE_BUNDLE_SIZE: u32 = 131072... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/verify/fuzz/src/fuzz_target_coldreset.rs | image/verify/fuzz/src/fuzz_target_coldreset.rs | // Licensed under the Apache-2.0 license
#![cfg_attr(feature = "libfuzzer-sys", no_main)]
#[cfg(all(not(feature = "libfuzzer-sys"), not(feature = "afl")))]
compile_error!("Either feature \"libfuzzer-sys\" or \"afl\" must be enabled!");
#[cfg(feature = "libfuzzer-sys")]
use libfuzzer_sys::fuzz_target;
#[cfg(feature ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/verify/fuzz/src/fuzz_target_updatereset.rs | image/verify/fuzz/src/fuzz_target_updatereset.rs | // Licensed under the Apache-2.0 license
#![cfg_attr(feature = "libfuzzer-sys", no_main)]
#[cfg(all(not(feature = "libfuzzer-sys"), not(feature = "afl")))]
compile_error!("Either feature \"libfuzzer-sys\" or \"afl\" must be enabled!");
#[cfg(feature = "libfuzzer-sys")]
use libfuzzer_sys::fuzz_target;
#[cfg(feature ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/app/src/main.rs | image/app/src/main.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
main.rs
Abstract:
Main entry point Caliptra Imaging application
--*/
use std::path::PathBuf;
use clap::{arg, value_parser, Command};
mod create;
/// Entry point
fn main() {
let sub_cmds = vec![Command::new("create")
.about("Create a new ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/app/src/create/config.rs | image/app/src/create/config.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
config.rs
Abstract:
File contains utilities for parsing configuration files
--*/
use anyhow::Context;
use serde_derive::{Deserialize, Serialize};
use std::path::PathBuf;
/// Vendor Key Configuration
#[derive(Default, Serialize, Deserialize)]
pub(crat... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/app/src/create/mod.rs | image/app/src/create/mod.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
mod.rs
Abstract:
File contains implementation Caliptra Image creation command.
--*/
mod config;
use anyhow::anyhow;
use anyhow::Context;
use caliptra_image_crypto::lms_priv_key_from_pem;
use caliptra_image_crypto::lms_pub_key_from_pem;
#[cfg(feature ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/gen/src/lib.rs | image/gen/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
File contains data strucutres for the Caliptra Image Generator.
--*/
mod generator;
pub use generator::ImageGenerator;
use anyhow::Context;
use caliptra_image_types::*;
use serde_derive::Deserialize;
use std::path::Path;
/// Image ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/gen/src/generator.rs | image/gen/src/generator.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
generator.rs
Abstract:
Caliptra Image generator
--*/
use anyhow::bail;
use caliptra_image_types::*;
use memoffset::offset_of;
use zerocopy::IntoBytes;
use crate::*;
/// Image generator
pub struct ImageGenerator<Crypto: ImageGeneratorCrypto> {
cry... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/types/src/lib.rs | image/types/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
File contains data structures for the firmware image bundle.
--*/
#![cfg_attr(not(feature = "std"), no_std)]
use caliptra_error::{CaliptraError, CaliptraResult};
use caliptra_lms_types::{
LmotsAlgorithmType, LmotsSignature, LmsAl... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/fake-keys/src/lib.rs | image/fake-keys/src/lib.rs | // Licensed under the Apache-2.0 license
use caliptra_image_gen::{ImageGeneratorOwnerConfig, ImageGeneratorVendorConfig};
use caliptra_image_types::{
ImageEccPrivKey, ImageEccPubKey, ImageLmsPrivKey, ImageLmsPublicKey, ImageMldsaPrivKey,
ImageMldsaPubKey, ImageOwnerPrivKeys, ImageVendorPrivKeys, ImageVendorPub... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/serde/src/lib.rs | image/serde/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
Caliptra Image Bundle serialization & deserialization routines.
--*/
use caliptra_image_types::*;
use std::io::Write;
use zerocopy::IntoBytes;
/// Image Bundle Writer
pub struct ImageBundleWriter<W: Write> {
writer: W,
}
impl<W: ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/elf/src/lib.rs | image/elf/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
File contains ELF Executable loading and parsing related functionality.
--*/
use anyhow::{bail, Context};
use caliptra_image_gen::ImageGeneratorExecutable;
use caliptra_image_types::ImageRevision;
use elf::abi::PT_LOAD;
use elf::endia... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/crypto/src/rustcrypto.rs | image/crypto/src/rustcrypto.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
File contains crypto utilities needed to generate images.
--*/
use core::{ops::Deref, str::from_utf8};
use std::path::Path;
use anyhow::{anyhow, bail, Context};
use caliptra_image_gen::{
from_hw_format, to_hw_format, ImageGenera... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/crypto/src/lib.rs | image/crypto/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
File contains crypto utilities needed to generate images.
--*/
use std::path::PathBuf;
use anyhow::{anyhow, Context};
use caliptra_image_types::*;
use caliptra_lms_types::{LmotsAlgorithmType, LmsAlgorithmType};
#[cfg(feature = "ope... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/image/crypto/src/openssl.rs | image/crypto/src/openssl.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
File contains crypto utilities needed to generate images.
--*/
use std::path::Path;
use anyhow::{bail, Context};
use caliptra_image_gen::{
from_hw_format, to_hw_format, u8_to_u32_le, ImageGeneratorCrypto, ImageGeneratorHasher,
}... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/lms-types/src/lib.rs | lms-types/src/lib.rs | // Licensed under the Apache-2.0 license
// TODO not(fuzzing), attribute not found
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
#[cfg(not(feature = "no-cfi"))]
use caliptra_cfi_derive::Launder;
use core::mem::size_of;
#[cfg(feature = "std")]
use core::mem::size_of_val;
#[cfg(feature = "std")]
use serde:... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/app/src/main.rs | sw-emulator/app/src/main.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
main.rs
Abstract:
File contains main entrypoint for Caliptra Emulator.
--*/
use caliptra_api_types::{DeviceLifecycle, SecurityState};
use caliptra_emu_bus::{Clock, Device, Event, EventData};
use caliptra_emu_cpu::{Cpu, CpuArgs, Pic, RvInstr, StepActi... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/app/src/gdb/gdb_target.rs | sw-emulator/app/src/gdb/gdb_target.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
gdb_target.rs
Abstract:
File contains gdb_target module for Caliptra Emulator.
--*/
use caliptra_emu_cpu::xreg_file::XReg;
use caliptra_emu_cpu::StepAction;
use caliptra_emu_cpu::{Cpu, WatchPtrKind};
use caliptra_emu_periph::CaliptraRootBus;
use cali... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/app/src/gdb/mod.rs | sw-emulator/app/src/gdb/mod.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
gdb_target.rs
Abstract:
File contains gdb module for Caliptra Emulator.
--*/
pub mod gdb_state;
pub mod gdb_target;
| rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/app/src/gdb/gdb_state.rs | sw-emulator/app/src/gdb/gdb_state.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
gdb_state.rs
Abstract:
File contains gdb_state module for Caliptra Emulator.
--*/
use super::gdb_target::GdbTarget;
use gdbstub::common::Signal;
use gdbstub::conn::{Connection, ConnectionExt};
use gdbstub::stub::SingleThreadStopReason;
use gdbstub::s... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/compliance-test/src/fs.rs | sw-emulator/compliance-test/src/fs.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
fs.rs
Abstract:
Offers filesystem functionality similar to std::fs but with better error
messages that include the path.
--*/
use std::fmt::Debug;
use std::path::{Path, PathBuf};
/// Same as [`std::fs::create_dir`] but with more informative erro... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/compliance-test/src/test_builder.rs | sw-emulator/compliance-test/src/test_builder.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
test_builder.rs
Abstract:
Code for compiling risc-v compliance tests from https://github.com/riscv-non-isa/riscv-arch-test.
--*/
use crate::exec::exec;
use crate::fs::{self, TempDir, TempFile};
use crate::{into_io_error, TestInfo};
use std::path::Path... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/compliance-test/src/main.rs | sw-emulator/compliance-test/src/main.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
main.rs
Abstract:
Test-runner for risc-v compliance tests from https://github.com/riscv-non-isa/riscv-arch-test.
--*/
use crate::test_builder::{TestBuilder, TestBuilderConfig};
use caliptra_emu_bus::{Bus, Clock, Ram};
use caliptra_emu_cpu::{Cpu, CpuA... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/compliance-test/src/exec.rs | sw-emulator/compliance-test/src/exec.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
exec.rs
Abstract:
Offers exec (subprocess) functionality similar to std::process but with better error
messages that include paths, args, and stderr.
--*/
use crate::fs::annotate_error;
use std::ffi::OsString;
use std::fmt;
use std::io::{self, Er... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/example/build.rs | sw-emulator/example/build.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
build.rs
Abstract:
Cargo build file
--*/
fn main() {
println!("cargo:rerun-if-changed=src/link.ld");
println!("cargo:rerun-if-changed=src/start.S");
}
| rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/example/src/main.rs | sw-emulator/example/src/main.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
main.rs
Abstract:
File contains entry point for bare-metal RISCV program
--*/
#![no_std]
#![no_main]
use core::arch::global_asm;
use core::ptr;
global_asm!(include_str!("start.S"));
const OUT_STR: &'static [u8; 14] = b"Hello Caliptra";
static mut ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/lib.rs | sw-emulator/lib/cpu/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
File contains exports for for Caliptra Emulator Library.
--*/
pub mod cpu;
mod csr_file;
mod instr;
mod internal_timers;
mod pic;
mod types;
pub mod xreg_file;
pub use cpu::StepAction;
pub use cpu::WatchPtrHit;
pub use cpu::WatchPtr... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/xreg_file.rs | sw-emulator/lib/cpu/src/xreg_file.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
xreg_file.rs
Abstract:
File contains implementation of RISC-v general purpose register file
--*/
use caliptra_emu_types::{emu_enum, RvAddr, RvData, RvException};
emu_enum!(
/// RISCV general purpose registers
#[derive(PartialOrd, Ord, Partia... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/internal_timers.rs | sw-emulator/lib/cpu/src/internal_timers.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
uart.rs
Abstract:
File contains VeeR Internal Timers implementation.
This implementation is focused on emulator performance
at the cost of accuracy, so it does not need to poll
the CPU every cycle.
--*/
use caliptra_emu_bus::{ActionHandle... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/types.rs | sw-emulator/lib/cpu/src/types.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
types.rs
Abstract:
Common types used in the project.
--*/
#![allow(clippy::unusual_byte_groupings)]
use crate::xreg_file::XReg;
use bitfield::{bitfield, BitRange, BitRangeMut};
use caliptra_emu_types::emu_enum;
/// Memory offsets for CPU
#[derive(D... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/csr_file.rs | sw-emulator/lib/cpu/src/csr_file.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
csr_file.rs
Abstract:
File contains implementation of RISC-V Config and status register file
--*/
use std::rc::Rc;
use crate::internal_timers::InternalTimers;
use crate::types::{RvMIE, RvMPMC, RvMStatus, RvPmpAddrMode, RvPmpCfgi, RvPmpiCfg, RvPrivMo... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/pic.rs | sw-emulator/lib/cpu/src/pic.rs | // Licensed under the Apache-2.0 license
use std::cell::{Cell, RefCell};
use std::rc::Rc;
use caliptra_emu_bus::{
Bus, BusError, Clock, ReadWriteRegister, ReadWriteRegisterArray, Register, Timer, TimerAction,
};
use caliptra_emu_derive::Bus;
use caliptra_emu_types::{RvAddr, RvData, RvSize};
use tock_registers::in... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/cpu.rs | sw-emulator/lib/cpu/src/cpu.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
cpu.rs
Abstract:
File contains the implementation of Caliptra CPU.
--*/
use crate::csr_file::{Csr, CsrFile};
use crate::instr::Instr;
use crate::types::{
CpuArgs, CpuOrgArgs, RvInstr, RvMEIHAP, RvMStatus, RvMemAccessType, RvMsecCfg, RvPrivMode,
}... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/op.rs | sw-emulator/lib/cpu/src/instr/op.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
op.rs
Abstract:
File contains implementation of RISCV Register Operation instructions
References:
https://riscv.org/wp-content/uploads/2019/06/riscv-spec.pdf
https://github.com/d0iasm/rvemu for arithmetic operations.
--*/
use crate::cpu::Cpu... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/test_macros.rs | sw-emulator/lib/cpu/src/instr/test_macros.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
test_macros.rs
Abstract:
File contains implementation of RISCV Instruction encoding
--*/
#[cfg(test)]
mod test {
#[macro_export]
macro_rules! test_ld_op {
($test:ident, $instr:ident, $result:expr, $offset:expr, $base:expr, $data:expr) ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/jal.rs | sw-emulator/lib/cpu/src/instr/jal.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
jal.rs
Abstract:
File contains implementation of Jump and Link instructions.
--*/
use crate::cpu::Cpu;
use crate::types::{RvInstr32J, RvInstr32Opcode};
use caliptra_emu_bus::Bus;
use caliptra_emu_types::RvException;
impl<TBus: Bus> Cpu<TBus> {
/... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/branch.rs | sw-emulator/lib/cpu/src/instr/branch.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
branch.rs
Abstract:
File contains implementation of branch instructions.
--*/
use crate::cpu::Cpu;
use crate::types::{RvInstr32B, RvInstr32BranchFunct3, RvInstr32Opcode};
use caliptra_emu_bus::Bus;
use caliptra_emu_types::RvException;
impl<TBus: Bus... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/auipc.rs | sw-emulator/lib/cpu/src/instr/auipc.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
auipc.rs
Abstract:
File contains implementation of Add Upper Immediate to Program Counter (`auipc`) instruction.
--*/
use crate::cpu::Cpu;
use crate::types::{RvInstr32Opcode, RvInstr32U};
use caliptra_emu_bus::Bus;
use caliptra_emu_types::{RvData, Rv... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/store.rs | sw-emulator/lib/cpu/src/instr/store.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
store.rs
Abstract:
File contains implementation of RISCV Store Instructions
--*/
use crate::cpu::Cpu;
use crate::types::{RvInstr32Opcode, RvInstr32S, RvInstr32StoreFunct3};
use caliptra_emu_bus::Bus;
use caliptra_emu_types::{RvAddr, RvException, RvSi... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/bit.rs | sw-emulator/lib/cpu/src/instr/bit.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
bit.rs
Abstract:
File contains implementation of bit manipulation instructions (Zba, Zbb, Zbc, Zbs).
--*/
use crate::cpu::Cpu;
use crate::types::{RvInstr32I, RvInstr32OpFunct7, RvInstr32OpImmFunct7, RvInstr32R};
use crate::xreg_file::XReg;
use calipt... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | true |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/fence.rs | sw-emulator/lib/cpu/src/instr/fence.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
fence.rs
Abstract:
File contains implementation of system instructions.
--*/
use crate::cpu::Cpu;
use crate::types::{RvInstr32FenceFunct3, RvInstr32I, RvInstr32Opcode};
use caliptra_emu_bus::Bus;
use caliptra_emu_types::RvException;
impl<TBus: Bus> ... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/system.rs | sw-emulator/lib/cpu/src/instr/system.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
system.rs
Abstract:
File contains implementation of system instructions.
--*/
use crate::cpu::Cpu;
use crate::csr_file::Csr;
use crate::types::{
RvInstr32I, RvInstr32Opcode, RvInstr32SystemFunct3, RvInstr32SystemImm, RvMStatus, RvPrivMode,
};
use... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/test_encoder.rs | sw-emulator/lib/cpu/src/instr/test_encoder.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
test_encoder.rs
Abstract:
File contains implementation of RISCV Instruction encoding.
--*/
#[cfg(test)]
pub mod tests {
use crate::types::{
RvInstr32B, RvInstr32BranchFunct3, RvInstr32I, RvInstr32J, RvInstr32LoadFunct3,
RvInstr32O... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/lui.rs | sw-emulator/lib/cpu/src/instr/lui.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lui.rs
Abstract:
File contains implementation of Load Upper Immediate (`lui`) instruction.
--*/
use crate::cpu::Cpu;
use crate::types::{RvInstr32Opcode, RvInstr32U};
use caliptra_emu_bus::Bus;
use caliptra_emu_types::{RvData, RvException};
impl<TBus... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/mod.rs | sw-emulator/lib/cpu/src/instr/mod.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
mod.rs
Abstract:
File contains implementation of RISCV Instructions
References:
https://riscv.org/wp-content/uploads/2019/06/riscv-spec.pdf
--*/
mod auipc;
mod bit;
mod branch;
mod compression;
mod fence;
mod jal;
mod jalr;
mod load;
mod lui;
mo... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/jalr.rs | sw-emulator/lib/cpu/src/instr/jalr.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
jalr.rs
Abstract:
File contains implementation of Jump and Link register instructions.
--*/
use crate::cpu::Cpu;
use crate::types::{RvInstr32I, RvInstr32Opcode};
use caliptra_emu_bus::Bus;
use caliptra_emu_types::RvException;
impl<TBus: Bus> Cpu<TBu... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/op_imm.rs | sw-emulator/lib/cpu/src/instr/op_imm.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
op_imm.rs
Abstract:
File contains implementation of RISCV Immediate instructions.
References:
https://riscv.org/wp-content/uploads/2019/06/riscv-spec.pdf
https://github.com/d0iasm/rvemu for arithmetic operations.
--*/
use crate::cpu::Cpu;
us... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/compression.rs | sw-emulator/lib/cpu/src/instr/compression.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
compression.rs
Abstract:
File contains code related to compressed RISC-V instructions.
--*/
use crate::{
types::{
RvInstr32B, RvInstr32BranchFunct3, RvInstr32I, RvInstr32J, RvInstr32LoadFunct3,
RvInstr32OpFunct10, RvInstr32OpImmFun... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/cpu/src/instr/load.rs | sw-emulator/lib/cpu/src/instr/load.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
load.rs
Abstract:
File contains implementation of RISCV Load Instructions.
--*/
use crate::cpu::Cpu;
use crate::types::{RvInstr32I, RvInstr32LoadFunct3, RvInstr32Opcode};
use caliptra_emu_bus::Bus;
use caliptra_emu_types::{RvAddr, RvData, RvException... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/types/src/exception.rs | sw-emulator/lib/types/src/exception.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
exception.rs
Abstract:
File contains the implementation for RISCV exceptions
--*/
use crate::emu_enum;
emu_enum! {
/// RISCV Exception Cause
#[derive(Debug, PartialOrd, Ord, PartialEq, Eq, Clone, Copy)]
pub RvExceptionCause;
u32;
... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/types/src/lib.rs | sw-emulator/lib/types/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
File contains exports for for Caliptra Emulator Types library.
--*/
#![cfg_attr(not(test), no_std)]
mod exception;
mod macros;
pub use crate::exception::{RvException, RvExceptionCause};
/// RISCV Data width
pub type RvData = u32;
... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/types/src/macros.rs | sw-emulator/lib/types/src/macros.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
macros.rs
Abstract:
Macros used by the project
--*/
#[macro_export]
macro_rules! emu_enum {
(
$(#[$($enum_attrs:tt)*])*
$vis:vis $enum_name:ident;
$type:ty;
{
$(
$(#[$($attrs:tt)*])*
... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/bus/src/rom.rs | sw-emulator/lib/bus/src/rom.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
rom.rs
Abstract:
File contains implementation of ROM
--*/
use crate::mem::Mem;
use crate::{Bus, BusError};
use caliptra_emu_types::{RvAddr, RvData, RvSize};
/// Read Only Memory Device
pub struct Rom {
/// Read Only Data
data: Mem,
}
impl R... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/bus/src/event.rs | sw-emulator/lib/bus/src/event.rs | // Licensed under the Apache-2.0 license.
#[derive(Clone, Debug, PartialEq)]
pub struct Event {
pub src: Device,
pub dest: Device,
pub event: EventData,
}
impl Event {
pub fn new(src: Device, dest: Device, event: EventData) -> Self {
Self { src, dest, event }
}
}
#[derive(Clone, Copy, Deb... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/bus/src/register.rs | sw-emulator/lib/bus/src/register.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
register.rs
Abstract:
File contains implementation of various register types used by peripherals
--*/
use crate::mem::Mem;
use crate::{Bus, BusError};
use caliptra_emu_types::{RvAddr, RvData, RvSize};
use tock_registers::interfaces::{Readable, Writea... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
chipsalliance/caliptra-sw | https://github.com/chipsalliance/caliptra-sw/blob/d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c/sw-emulator/lib/bus/src/lib.rs | sw-emulator/lib/bus/src/lib.rs | /*++
Licensed under the Apache-2.0 license.
File Name:
lib.rs
Abstract:
File contains exports for for Caliptra Emulator Bus library.
--*/
mod bus;
mod clock;
mod dynamic_bus;
mod event;
mod mem;
mod mmio;
mod ram;
mod register;
mod register_array;
mod rom;
pub mod testing;
pub use crate::bus::{Bus, BusEr... | rust | Apache-2.0 | d6e4f6fae9e4966ec1f5a52167a60c87fafecf1c | 2026-01-04T20:21:36.839730Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.