mirror of
https://github.com/annoyatron255/yosys4gal.git
synced 2024-12-22 10:42:24 +00:00
fix pin ordering in SOP stuff
This commit is contained in:
parent
2d6f0123cd
commit
22f1a2a26b
|
@ -162,7 +162,8 @@ fn make_term_from_sop(graph: &Graph, sop: GalSop, pcf: &PcfFile) -> Term {
|
||||||
let product_size = sop.parameters.width;
|
let product_size = sop.parameters.width;
|
||||||
let chunksize = product_size * 2; // 00 for dontcare, 01 for negation, 10 for positive i think
|
let chunksize = product_size * 2; // 00 for dontcare, 01 for negation, 10 for positive i think
|
||||||
|
|
||||||
let input_nets = sop.connections.get("A").unwrap();
|
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.
|
||||||
|
|
||||||
let terms: Vec<Vec<Pin>> = table
|
let terms: Vec<Vec<Pin>> = table
|
||||||
.chunks(chunksize as usize)
|
.chunks(chunksize as usize)
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
module and_gate (clk, A, B, Y);
|
module and_gate (clk, A, B, Y);
|
||||||
|
|
||||||
input A, B;
|
input A, B;
|
||||||
output Y;
|
input clk;
|
||||||
|
output reg Y;
|
||||||
|
|
||||||
always @(posedge clk) begin
|
always @(posedge clk) begin
|
||||||
Y <= A && B;
|
Y <= A && B;
|
||||||
|
|
Loading…
Reference in a new issue