mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
Added $slice and $concat cell types
This commit is contained in:
parent
a1ac710ab8
commit
fc3b3c4ec3
8 changed files with 140 additions and 4 deletions
|
@ -829,6 +829,36 @@ endmodule
|
|||
|
||||
// --------------------------------------------------------
|
||||
|
||||
module \$slice (A, Y);
|
||||
|
||||
parameter OFFSET = 0;
|
||||
parameter A_WIDTH = 0;
|
||||
parameter Y_WIDTH = 0;
|
||||
|
||||
input [A_WIDTH-1:0] A;
|
||||
output [Y_WIDTH-1:0] Y;
|
||||
|
||||
assign Y = A >> OFFSET;
|
||||
|
||||
endmodule
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
module \$concat (A, B, Y);
|
||||
|
||||
parameter A_WIDTH = 0;
|
||||
parameter B_WIDTH = 0;
|
||||
|
||||
input [A_WIDTH-1:0] A;
|
||||
input [B_WIDTH-1:0] B;
|
||||
output [A_WIDTH+B_WIDTH-1:0] Y;
|
||||
|
||||
assign Y = {B, A};
|
||||
|
||||
endmodule
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
module \$mux (A, B, S, Y);
|
||||
|
||||
parameter WIDTH = 0;
|
||||
|
|
|
@ -956,6 +956,18 @@ endmodule
|
|||
|
||||
// --------------------------------------------------------
|
||||
|
||||
(* techmap_simplemap *)
|
||||
module \$slice ;
|
||||
endmodule
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
(* techmap_simplemap *)
|
||||
module \$concat ;
|
||||
endmodule
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
(* techmap_simplemap *)
|
||||
module \$mux ;
|
||||
endmodule
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue