forked from libre-chip/cpu
update for new fayalite
This commit is contained in:
parent
24d6537ffe
commit
554238c544
9 changed files with 1266 additions and 1245 deletions
|
|
@ -241,7 +241,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
// TODO: finish
|
||||
connect(
|
||||
rob.renamed_insns_in[fetch_index].data,
|
||||
Expr::ty(rob).renamed_insns_in.element().data.HdlNone(),
|
||||
rob.ty().renamed_insns_in.element().data.HdlNone(),
|
||||
);
|
||||
// TODO: finish
|
||||
connect(
|
||||
|
|
@ -263,7 +263,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
);
|
||||
connect(
|
||||
renamed_mops[fetch_index],
|
||||
Expr::ty(renamed_mops).element().HdlNone(),
|
||||
renamed_mops.ty().element().HdlNone(),
|
||||
);
|
||||
#[hdl]
|
||||
struct RenameTableReadPort<T> {
|
||||
|
|
@ -332,7 +332,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
let write_port = wire_with_loc(
|
||||
&format!("{table_name}_{fetch_index}_{}", reg_kind.reg_name()),
|
||||
SourceLocation::caller(),
|
||||
Expr::ty(write_port_),
|
||||
write_port_.ty(),
|
||||
);
|
||||
connect(write_port_, write_port);
|
||||
write_ports.push_back(write_port);
|
||||
|
|
@ -343,7 +343,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
addr: 0_hdl_u0,
|
||||
en: false,
|
||||
clk: cd.clk,
|
||||
data: Expr::ty(write_port.data).uninit(),
|
||||
data: write_port.data.ty().uninit(),
|
||||
mask: splat_mask(config.p_reg_num(), true.to_expr()),
|
||||
},
|
||||
);
|
||||
|
|
@ -375,7 +375,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
config.renamed_mop_in_unit().TransformedMove,
|
||||
|renamed_mop, renamed_move_op: Expr<MoveRegMOp<_, _>>| {
|
||||
// TODO: finish handling MoveRegMOp
|
||||
connect(renamed_mop, Expr::ty(renamed_mop).HdlNone());
|
||||
connect(renamed_mop, renamed_mop.ty().HdlNone());
|
||||
},
|
||||
);
|
||||
connect(
|
||||
|
|
@ -429,7 +429,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
);
|
||||
connect(
|
||||
selected_unit_index_leaf,
|
||||
Expr::ty(selected_unit_index_leaf).HdlNone(),
|
||||
selected_unit_index_leaf.ty().HdlNone(),
|
||||
);
|
||||
let unit_index_wire = wire_with_loc(
|
||||
&format!("unit_index_{fetch_index}_{unit_index}"),
|
||||
|
|
@ -447,7 +447,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
let selected_unit_index_node = wire_with_loc(
|
||||
&format!("selected_unit_index_node_{fetch_index}_{state}"),
|
||||
SourceLocation::caller(),
|
||||
Expr::ty(l),
|
||||
l.ty(),
|
||||
);
|
||||
*state += 1;
|
||||
connect(selected_unit_index_node, l);
|
||||
|
|
@ -516,7 +516,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
connect(unit_free_regs_tracker.alloc_out[0].ready, false);
|
||||
connect(
|
||||
unit_to_reg_alloc.input.data,
|
||||
Expr::ty(unit_to_reg_alloc.input).data.HdlNone(),
|
||||
unit_to_reg_alloc.input.ty().data.HdlNone(),
|
||||
);
|
||||
for fetch_index in 0..config.fetch_width.get() {
|
||||
#[hdl]
|
||||
|
|
@ -550,7 +550,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
} else {
|
||||
connect(
|
||||
unit_to_reg_alloc.input.data,
|
||||
HdlSome(Expr::ty(unit_to_reg_alloc.input).data.HdlSome.uninit()),
|
||||
HdlSome(unit_to_reg_alloc.input.ty().data.HdlSome.uninit()),
|
||||
);
|
||||
// FIXME: add hdl_assert(cd.clk, false.to_expr(), "");
|
||||
}
|
||||
|
|
@ -578,7 +578,7 @@ pub fn reg_alloc(config: &CpuConfig) {
|
|||
connect(unit_to_reg_alloc.unit_forwarding_info, unit_forwarding_info);
|
||||
connect(
|
||||
unit_forwarding_info.unit_output_writes[unit_index],
|
||||
Expr::ty(unit_forwarding_info)
|
||||
unit_forwarding_info.ty()
|
||||
.unit_output_writes
|
||||
.element()
|
||||
.HdlNone(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue