|
Берем пример из reference:
module sqrtb(z, a);
parameter asize = 8;
output [(asize/2)-1:0] z;
input [asize-1:0] a;
reg [(asize/2)-1:0] z;
always @(a) begin :lbl
integer i;
// r is remainder, tt is delta for adding one bit
// v is current sqrt value
reg [asize-1:0] v, r, tt;
v = 0;
r = a;
for (i = asize/2 - 1; i >= 0; i = i - 1) begin
tt = (v << (i + 1)) | (1 << (i + i));
if (tt <= r) begin
v = v | (1 << i);
r = r - tt;
end
end
z = v;
end
endmodule
module sqrterr(e, a);
output [7:0] e;
input [7:0] a;
wire [3:0] sqa;
sqrtb sq (.z(sqa), .a(a)) /* synthesis altera_implement_in_eab=1 */;
defparam sq.asize = 8;
wire [7:0] zz = sqa * sqa;
assign e = a - zz;
endmodule
После синтеза в репорте честно написано:
@N: FA171 :"e:\work\mc_i386\temp\rgfctrl\rgfctrl.v":29:10:29:11|Instance sq uses EAB resources.
Total LUTs: 22 of 4992 ( 0%)
Logic resources: 22 LCs of 4992 ( 0%)
Number of Nets: 55
Number of Inputs: 115
Register bits: 0
EABs: 1 (8% of 12)
I/O cells: 16
Details:
Cells in logic mode: 8
Cells in arith mode: 14
Cells in cascade mode: 0
Cells in counter mode: 0
##### END OF AREA REPORT #####]
@N: FA171 :"e:\work\mc_i386\temp\rgfctrl\rgfctrl.v":29:10:29:11|Instance sq uses EAB resources.
Total LUTs: 22 of 4992 ( 0%)
Logic resources: 22 LCs of 4992 ( 0%)
Number of Nets: 55
Number of Inputs: 115
Register bits: 0
EABs: 1 (8% of 12)
I/O cells: 16
Details:
Cells in logic mode: 8
Cells in arith mode: 14
Cells in cascade mode: 0
Cells in counter mode: 0
Однако никаких файлов инициализации памяти в папке проекта, ни упоминаия о модуле памяти в выходном edif файле не содержится, естественно Quartus после этого имплементирует все в логику....
Блин, подскажите в чем грабли или подскажите инструмент который может утаптывать логику в память.
ЗЫ используемый кристал Асекс