forked from libre-chip/cpu
working on reg_alloc -- wire up free_regs_tracker.alloc_out
This commit is contained in:
parent
9781f1f4c5
commit
88eff5952b
4 changed files with 2274 additions and 1866 deletions
|
|
@ -155,9 +155,20 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
unit_free_regs_tracker.free_in[0].data,
|
||||
HdlOption[UInt[config.out_reg_num_width]].uninit(), // FIXME: just for debugging
|
||||
);
|
||||
connect(
|
||||
unit_free_regs_tracker.alloc_out[0].ready,
|
||||
Bool.uninit(), // FIXME: just for debugging
|
||||
);
|
||||
connect(unit_free_regs_tracker.alloc_out[0].ready, false);
|
||||
for fetch_index in 0..config.fetch_width.get() {
|
||||
#[hdl]
|
||||
if let HdlNone = unit_free_regs_tracker.alloc_out[0].data {
|
||||
// must come after to override connects in loops above
|
||||
connect(available_units[fetch_index][unit_index], false);
|
||||
}
|
||||
#[hdl]
|
||||
if let HdlSome(unit_num) = selected_unit_nums[fetch_index] {
|
||||
#[hdl]
|
||||
if unit_num.value.cmp_eq(unit_index) {
|
||||
connect(unit_free_regs_tracker.alloc_out[0].ready, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue