sim: WIP working on memory
This commit is contained in:
parent
3ed7827485
commit
9654167ca3
|
@ -1215,10 +1215,16 @@ struct Register {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum MemoryPort {
|
||||
ReadOnly {},
|
||||
WriteOnly {},
|
||||
ReadWrite {},
|
||||
|
||||
struct MemoryPort {
|
||||
clk_triggered: StatePartIndex<StatePartKindSmallSlots>,
|
||||
addr_delayed: Vec<StatePartIndex<StatePartKindSmallSlots>>,
|
||||
en_delayed: Vec<StatePartIndex<StatePartKindSmallSlots>>,
|
||||
data: CompiledValue<CanonicalType>,
|
||||
read_data_delayed: Vec<TypeIndex>,
|
||||
write_data_delayed: Vec<TypeIndex>,
|
||||
write_mask_delayed: Vec<TypeIndex>,
|
||||
write_mode_delayed: Vec<StatePartIndex<StatePartKindSmallSlots>>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -3350,11 +3356,37 @@ impl Compiler {
|
|||
};
|
||||
self.decl_conditions.insert(target, conditions);
|
||||
trace_decls.push(self.make_trace_decl(instantiated_module, target_base));
|
||||
todo!("handle read/write");
|
||||
match port.port_kind() {
|
||||
PortKind::ReadOnly => MemoryPort::ReadOnly {},
|
||||
PortKind::WriteOnly => MemoryPort::WriteOnly {},
|
||||
PortKind::ReadWrite => MemoryPort::ReadWrite {},
|
||||
PortKind::ReadOnly => MemoryPort {
|
||||
clk_triggered: todo!(),
|
||||
addr_delayed: todo!(),
|
||||
en_delayed: todo!(),
|
||||
data: todo!(),
|
||||
read_data_delayed: todo!(),
|
||||
write_data_delayed: todo!(),
|
||||
write_mask_delayed: todo!(),
|
||||
write_mode_delayed: todo!(),
|
||||
},
|
||||
PortKind::WriteOnly => MemoryPort {
|
||||
clk_triggered: todo!(),
|
||||
addr_delayed: todo!(),
|
||||
en_delayed: todo!(),
|
||||
data: todo!(),
|
||||
read_data_delayed: todo!(),
|
||||
write_data_delayed: todo!(),
|
||||
write_mask_delayed: todo!(),
|
||||
write_mode_delayed: todo!(),
|
||||
},
|
||||
PortKind::ReadWrite => MemoryPort {
|
||||
clk_triggered: todo!(),
|
||||
addr_delayed: todo!(),
|
||||
en_delayed: todo!(),
|
||||
data: todo!(),
|
||||
read_data_delayed: todo!(),
|
||||
write_data_delayed: todo!(),
|
||||
write_mask_delayed: todo!(),
|
||||
write_mode_delayed: todo!(),
|
||||
},
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
|
Loading…
Reference in a new issue