adam_lo
Newbie level 6
- Joined
- Feb 21, 2013
- Messages
- 11
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,571
Hi,
I wanted to create IPCore to add two fixed point .
I added fixed_pkg file to pcores\add_fix_v1_00_a\hdl\vhdl .
first I wrote in entity :
port(
reg_out : out sfixed(29 downto -2);
.
.);
and in architecture I wrote process
fix: process(slv_reg0,slv_reg1)
variable reg0,reg1,reg2 : (29 downto -2);
begin
reg0:=to_sfixed(slv_reg0,C_SLV_DWIDTH);
reg1:=to_sfixed(slv_reg1,C_SLV_DWIDTH);
reg2:=reg1 + reg0;
reg_out <=reg2;
end process fix;
when I wanted to import it
Errors:
D:\Labs\ipcore\pcores\add_fix_v1_00_a\hdl\vhdl\user_logic.vhd" line 151.
to_sfixed can not have such operands in this context.
D:\Labs\ipcore\pcores\add_fix_v1_00_a\hdl\vhdl\user_logic.vhd" line 152.
to_sfixed can not have such operands in this context.
EDK:2121-Parse Errors encountered in HDL source
Warning:EDK:3590- Unable to detect temporary project file.
what are the steps to overcome this errors ?
Thanks in advance
I wanted to create IPCore to add two fixed point .
I added fixed_pkg file to pcores\add_fix_v1_00_a\hdl\vhdl .
first I wrote in entity :
port(
reg_out : out sfixed(29 downto -2);
.
.);
and in architecture I wrote process
fix: process(slv_reg0,slv_reg1)
variable reg0,reg1,reg2 : (29 downto -2);
begin
reg0:=to_sfixed(slv_reg0,C_SLV_DWIDTH);
reg1:=to_sfixed(slv_reg1,C_SLV_DWIDTH);
reg2:=reg1 + reg0;
reg_out <=reg2;
end process fix;
when I wanted to import it
Errors:
D:\Labs\ipcore\pcores\add_fix_v1_00_a\hdl\vhdl\user_logic.vhd" line 151.
to_sfixed can not have such operands in this context.
D:\Labs\ipcore\pcores\add_fix_v1_00_a\hdl\vhdl\user_logic.vhd" line 152.
to_sfixed can not have such operands in this context.
EDK:2121-Parse Errors encountered in HDL source
Warning:EDK:3590- Unable to detect temporary project file.
what are the steps to overcome this errors ?
Thanks in advance