From 5c5d325937c278b6bfe2bd0f771da45d6671c043 Mon Sep 17 00:00:00 2001 From: saji Date: Sat, 4 May 2024 23:48:50 -0500 Subject: [PATCH] add olmc_test pcf and remove dummy SOP insertion from compiler --- compiler/src/fitter.rs | 15 +-------------- testcases/olmc_test.pcf | 7 +++++++ 2 files changed, 8 insertions(+), 14 deletions(-) create mode 100644 testcases/olmc_test.pcf diff --git a/compiler/src/fitter.rs b/compiler/src/fitter.rs index 0be84a4..ced3804 100644 --- a/compiler/src/fitter.rs +++ b/compiler/src/fitter.rs @@ -48,20 +48,6 @@ fn get_sop_for_olmc(graph: &Graph, olmc_idx: &NodeIdx) -> Result Some(s.clone()), - Node::Olmc(o) => { - debug!("Driver is another OLMC, creating dummy SOP, {:?}", o); - // find the row that contains this olmc. - // we know this exists because mapping has already finished. - let newsop = GalSop { - connections: HashMap::from([("A".to_string(), vec![i.net.clone()])]), - parameters: GalSopParameters { - depth: 1, - width: 1, - table: "10".to_string(), - }, - }; - Some(newsop) - } _ => None, } }) @@ -199,6 +185,7 @@ fn make_term_from_sop( let n_products = sop.parameters.depth; let product_size = sop.parameters.width; let chunksize = product_size * 2; // 00 for dontcare, 01 for negation, 10 for positive i think + debug!("Making Term from SOP {:?}", sop); let mut input_nets = sop.connections.get("A").unwrap().clone(); input_nets.reverse(); // the order is backwards from how we read it in the alg. diff --git a/testcases/olmc_test.pcf b/testcases/olmc_test.pcf new file mode 100644 index 0000000..db28f8b --- /dev/null +++ b/testcases/olmc_test.pcf @@ -0,0 +1,7 @@ +set_io clk 1 +set_io A 3 +set_io B 4 +set_io AND 13 +set_io NAND 14 +set_io REG_AND 15 +set_io REG_NAND 16