Skip to content

Commit

Permalink
Remove RealWireDataSource::OutPort
Browse files Browse the repository at this point in the history
  • Loading branch information
VonTum committed Jul 9, 2024
1 parent 2136557 commit 35a1a8c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/codegen_fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl<'g, 'out, Stream : std::fmt::Write> CodeGenerationContext<'g, 'out, Stream>
RealWireDataSource::Constant { value } => {
writeln!(self.program_text, " = {};", value.to_string())?;
}
RealWireDataSource::ReadOnly | RealWireDataSource::OutPort { sub_module_id:_, port_id:_ } => {
RealWireDataSource::ReadOnly => {
writeln!(self.program_text, ";")?;
}
RealWireDataSource::Multiplexer{is_state, sources : _} => {
Expand Down Expand Up @@ -231,7 +231,6 @@ impl<'g, 'out, Stream : std::fmt::Write> CodeGenerationContext<'g, 'out, Stream>
writeln!(self.program_text, "end")?;
}
RealWireDataSource::ReadOnly => {}
RealWireDataSource::OutPort { sub_module_id:_, port_id:_ } => {}
RealWireDataSource::Select{root : _, path : _} => {}
RealWireDataSource::UnaryOp{op : _, right : _} => {}
RealWireDataSource::BinaryOp{op : _, left : _, right : _} => {}
Expand Down
2 changes: 1 addition & 1 deletion src/instantiation/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl<'fl, 'l> InstantiationContext<'fl, 'l> {
let source = if port_data.is_input {
RealWireDataSource::Multiplexer { is_state: None, sources: Vec::new() }
} else {
RealWireDataSource::OutPort { sub_module_id, port_id }
RealWireDataSource::ReadOnly
};
let domain = submodule_instruction.local_interface_domains[port_data.domain];
let new_wire = self.wires.alloc(RealWire {
Expand Down
1 change: 0 additions & 1 deletion src/instantiation/latency_count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ impl RealWireDataSource {
fn iter_sources_with_min_latency<F : FnMut(WireID, i64)>(&self, mut f : F) {
match self {
RealWireDataSource::ReadOnly => {}
RealWireDataSource::OutPort { .. } => {}
RealWireDataSource::Multiplexer { is_state: _, sources } => {
for s in sources {
f(s.from.from, s.from.num_regs);
Expand Down
1 change: 0 additions & 1 deletion src/instantiation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ pub struct MultiplexerSource {
#[derive(Debug)]
pub enum RealWireDataSource {
ReadOnly,
OutPort{sub_module_id : SubModuleID, port_id : PortID},
Multiplexer{is_state : Option<Value>, sources : Vec<MultiplexerSource>},
UnaryOp{op : UnaryOperator, right : WireID},
BinaryOp{op : BinaryOperator, left : WireID, right : WireID},
Expand Down
1 change: 0 additions & 1 deletion src/instantiation/typecheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ impl<'fl, 'l> InstantiationContext<'fl, 'l> {

match &this_wire.source {
RealWireDataSource::ReadOnly => {}
RealWireDataSource::OutPort { sub_module_id:_, port_id:_ } => {} // Currently all ports have their types assigned at execution time
RealWireDataSource::Multiplexer { is_state:_, sources:_ } => {} // Do muxes later.
&RealWireDataSource::UnaryOp { op, right } => {
let right_typ = self.wires[right].typ.clone();
Expand Down

0 comments on commit 35a1a8c

Please sign in to comment.