Skip to content
Merged
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
43 changes: 1 addition & 42 deletions bootstrap/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8262,7 +8262,7 @@ impl Codegen {
self.write(HOST_IO_ZIG);
}
let mut threads = false;
Self::visit_calls(&ast.children, &mut |c| threads |= matches!(c.name.as_str(), "thread_spawn" | "thread_join" | "thread_cores"));
Self::visit_calls(&ast.children, &mut |c| threads |= matches!(c.name.as_str(), "thread_spawn" | "thread_join" | "thread_cores") && !self.declared_fns.contains(&c.name));
if threads {
self.write(THREAD_ZIG);
}
Expand Down Expand Up @@ -38460,21 +38460,6 @@ mod tests_hir_assembler {
assert_eq!(sec.end(), 128);
}

#[test]
fn test_align_address_zero() {
assert_eq!(align_address(5, 4), 8);
}

#[test]
fn test_align_address_already_aligned() {
assert_eq!(align_address(8, 4), 8);
}

#[test]
fn test_align_address_zero_alignment() {
assert_eq!(align_address(5, 0), 5);
}

#[test]
fn test_instr_count() {
let cfg = AsmConfig::new("test");
Expand Down Expand Up @@ -38686,7 +38671,6 @@ mod tests_hir_testbench {
assert!(cfg.active_low);
assert_eq!(cfg.delay_cycles, 5);
assert_eq!(cfg.duration_cycles, 10);
assert_eq!(cfg.reset_end_cycle(), 15);
}

#[test]
Expand Down Expand Up @@ -40072,16 +40056,6 @@ mod tests_hir_timing {
assert!(!r.passed());
}

#[test]
fn test_path_delay() {
let arcs = vec![
TimingArc::comb("a", "b", 100),
TimingArc::comb("b", "c", 200),
TimingArc::comb("c", "d", 300),
];
assert_eq!(path_delay(&arcs), 600);
}

#[test]
fn test_slack_positive() {
assert_eq!(TimingModel::slack(5000, 10000), 5000);
Expand Down Expand Up @@ -40112,21 +40086,6 @@ mod tests_hir_timing {
assert_eq!(TimingModel::est_reg_to_reg_delay(3), 800);
}

#[test]
fn test_worst_path() {
let paths = vec![
TimingPath::new("a", "b", 500, 0),
TimingPath::new("c", "d", 1200, 0),
TimingPath::new("e", "f", 800, 0),
];
assert_eq!(worst_path_delay(&paths), 1200);
}

#[test]
fn test_worst_path_empty() {
assert_eq!(worst_path_delay(&[]), 0);
}

#[test]
fn test_validate_constraint_ok() {
let c = TimingConstraint::from_period("clk", 10000);
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/stage0/FROZEN_HASH
Original file line number Diff line number Diff line change
@@ -1 +1 @@
509db03c8f4d1f846c0a15e07208b0564886c65e2c0eeb4b5c013e4533fe1f6c bootstrap/src/compiler.rs
2d301cdb4a589b86db25a098d0b95925132efb53e51b795e6cbee6e7cbcd0d21 bootstrap/src/compiler.rs
Loading