File tree Expand file tree Collapse file tree 2 files changed +19
-11
lines changed Expand file tree Collapse file tree 2 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN
120
120
read_verilog_args.push_back (out_verilog_filename);
121
121
Pass::call (design, read_verilog_args);
122
122
123
- log (" Replacing module %s with the output of Lakeroad" , top_module_name.c_str ());
123
+ log (" Replacing module %s with the output of Lakeroad\n " , top_module_name.c_str ());
124
124
design->remove (module );
125
125
auto new_module = design->module (RTLIL::escape_id (temp_module_name));
126
126
if (new_module == nullptr )
Original file line number Diff line number Diff line change 4
4
read_verilog << EOT
5
5
(* template = "dsp",
6
6
architecture = "xilinx-ultrascale-plus",
7
- initiation_interval = 1 *)
7
+ initiation_interval = 2 *)
8
8
module test (
9
9
(* data *)
10
- input [7 :0] a,
10
+ input [17 :0] a,
11
11
(* data *)
12
- input [7:0] b,
12
+ input [17:0] b,
13
+ (* data *)
14
+ input [17:0] c,
15
+ (* data *)
16
+ input [17:0] d,
13
17
(* clk *)
14
18
input clk,
15
19
(* out *)
16
- output [7 :0] o);
20
+ output [17 :0] o);
17
21
18
- reg [7:0] r0;
19
- always @ (posedge clk)
20
- r0 <= a*b;
21
- assign o = r0;
22
+ reg [17:0] r0;
23
+ reg [17:0] r1;
24
+ always @ (posedge clk) begin
25
+ r0 <= (d+a)*b&c;
26
+ r1 <= r0;
27
+ end
28
+ assign o = r1;
22
29
23
30
endmodule
24
31
EOT
25
32
26
33
# Call Lakeroad pass.
27
34
lakeroad
28
35
29
- # Ensure that one DSP has been instantiated.
30
- select -assert-count 1 */t:DSP48E2
36
+ # Ensure there's exactly one cell, and that that cell is a DSP48E2.
37
+ select -assert-count 1 */t:*
38
+ select -assert-count 1 */t:DSP48E2
You can’t perform that action at this time.
0 commit comments