mirror of
https://github.com/annoyatron255/yosys4gal.git
synced 2024-12-22 10:42:24 +00:00
add olmc_test pcf and remove dummy SOP insertion from compiler
This commit is contained in:
parent
49d558ed84
commit
5c5d325937
|
@ -48,20 +48,6 @@ fn get_sop_for_olmc(graph: &Graph, olmc_idx: &NodeIdx) -> Result<GalSop, Mapping
|
|||
debug!("Found driver node {:?}", node);
|
||||
match node {
|
||||
Node::Sop(s) => 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.
|
||||
|
|
7
testcases/olmc_test.pcf
Normal file
7
testcases/olmc_test.pcf
Normal file
|
@ -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
|
Loading…
Reference in a new issue