V
Vishu
Guest
Hello All,
I have a question on part selects that hopefully someone can help me
with. I am trying to implement swapping and shifting of a 32-bit
address bus to a 24-bit address bus. I am using the Xilinx ISE
synthesis tool.
I am familiar with the right way to implement this in VHDL but I am not
very proficient in Verliog to know what the equivalent syntax would
look like.
-- VHDL code that works --
MAP_ADDR(23 DOWNTO 0) <= ADDR(7 TO 30) WHEN (lsize = '1')
ELSE ADDR(8 TO 31);
---------------------------------------------------------
//** VERILOG CODE RESULTS IN ERROR**
input [31:6] ADDR;
output [23:0] MAP_ADDR;
wire [1:0] lsize;
assign MAP_ADDR[23:0] = (lsize == 1'b1) ? ADDR[7:30] : ADDR[8:31];
//****************************************************************
Error Message:
ERROR:HDLCompilers:191 - lbaddrgen.v line 44 Indices in part-select of
vector wire 'ADDR' are reversed
ERROR:HDLCompilers:191 - lbaddrgen.v line 44 Indices in part-select of
vector wire 'ADDR' are reversed
ERROR:HDLCompilers:185 - lbaddrgen.v line 44 Illegal right hand side of
continuous assign
Any input is deeply appreciated.
Best Regards,
Vishu
I have a question on part selects that hopefully someone can help me
with. I am trying to implement swapping and shifting of a 32-bit
address bus to a 24-bit address bus. I am using the Xilinx ISE
synthesis tool.
I am familiar with the right way to implement this in VHDL but I am not
very proficient in Verliog to know what the equivalent syntax would
look like.
-- VHDL code that works --
MAP_ADDR(23 DOWNTO 0) <= ADDR(7 TO 30) WHEN (lsize = '1')
ELSE ADDR(8 TO 31);
---------------------------------------------------------
//** VERILOG CODE RESULTS IN ERROR**
input [31:6] ADDR;
output [23:0] MAP_ADDR;
wire [1:0] lsize;
assign MAP_ADDR[23:0] = (lsize == 1'b1) ? ADDR[7:30] : ADDR[8:31];
//****************************************************************
Error Message:
ERROR:HDLCompilers:191 - lbaddrgen.v line 44 Indices in part-select of
vector wire 'ADDR' are reversed
ERROR:HDLCompilers:191 - lbaddrgen.v line 44 Indices in part-select of
vector wire 'ADDR' are reversed
ERROR:HDLCompilers:185 - lbaddrgen.v line 44 Illegal right hand side of
continuous assign
Any input is deeply appreciated.
Best Regards,
Vishu