D
Diego UTN-FRP
Hello people.
Maybe someone here can help me.
I have made some code for a wishbone model in VHDL and some procedures
to write and read to it and a
Record to group the signals together and to be able to have more than
one wishbone with the same set of procedures.
I think that there is no problem with the procedure but i am having
problems to pass some parameters.
If i call the procedure with completely constant values it works
perfekt.
If i call it with a signal of the same length, it doesnt give error in
that line. Also if the signal is initialiced with only a constant it
works too.
But i cant find the way to make the parameters non-constant.
I mean, to pass values of possible variables, multiple constants
definitions or even signals.
Please see my chunck of code, where i think the error ist.
If you need more please tell me. I just dont want to polute the post.
signal cpol : std_logic '0';
signal cpha : std_logic '0';
signal e : std_logic_vector(1 downto 0) := "00";
signal d: std_logic_vector(7 downto 0);
signal wishbone0 : wb_master.t_wishbone;
constant SPCR : std_logic_vector(3 downto 0) := "00";
.......
wb_master.bus_write( wishbone0, 1, SPCR, (B"0101", cpol, cpha,
e) ); <------- ERROR here
..... or .....
d <= "01010000";
d(3) <= cpol; <------- ERROR here
d(2) <= cpha; <------- ERROR here
d(1 downto 0) <= e; <------- ERROR here
wb_master.bus_write( wishbone0, 1, SPCR, d );
ERROR is:
Target type ieee.std_logic_1164.std_ulogic in signal assignment is
different frim expression type std.standard.integer.
Target type ieee.std_logic_1164.std_ulogic in signal assignment is
different frim expression type std.standard.integer.
Target type ieee.std_logic_1164.std_ulogic in signal assignment is
different frim expression type std.standard.integer.
(one for each marked line)
..... where inside a package : ....
procedure bus_write (
signal wb : inout t_wishbone ;
delay : in natural ;
a : in std_logic_vector (1 down to 0) ;
d : in std_logic_vector(7 downto 0)
) is ....
Thank you very much.
Diego
Maybe someone here can help me.
I have made some code for a wishbone model in VHDL and some procedures
to write and read to it and a
Record to group the signals together and to be able to have more than
one wishbone with the same set of procedures.
I think that there is no problem with the procedure but i am having
problems to pass some parameters.
If i call the procedure with completely constant values it works
perfekt.
If i call it with a signal of the same length, it doesnt give error in
that line. Also if the signal is initialiced with only a constant it
works too.
But i cant find the way to make the parameters non-constant.
I mean, to pass values of possible variables, multiple constants
definitions or even signals.
Please see my chunck of code, where i think the error ist.
If you need more please tell me. I just dont want to polute the post.
signal cpol : std_logic '0';
signal cpha : std_logic '0';
signal e : std_logic_vector(1 downto 0) := "00";
signal d: std_logic_vector(7 downto 0);
signal wishbone0 : wb_master.t_wishbone;
constant SPCR : std_logic_vector(3 downto 0) := "00";
.......
wb_master.bus_write( wishbone0, 1, SPCR, (B"0101", cpol, cpha,
e) ); <------- ERROR here
..... or .....
d <= "01010000";
d(3) <= cpol; <------- ERROR here
d(2) <= cpha; <------- ERROR here
d(1 downto 0) <= e; <------- ERROR here
wb_master.bus_write( wishbone0, 1, SPCR, d );
ERROR is:
Target type ieee.std_logic_1164.std_ulogic in signal assignment is
different frim expression type std.standard.integer.
Target type ieee.std_logic_1164.std_ulogic in signal assignment is
different frim expression type std.standard.integer.
Target type ieee.std_logic_1164.std_ulogic in signal assignment is
different frim expression type std.standard.integer.
(one for each marked line)
..... where inside a package : ....
procedure bus_write (
signal wb : inout t_wishbone ;
delay : in natural ;
a : in std_logic_vector (1 down to 0) ;
d : in std_logic_vector(7 downto 0)
) is ....
Thank you very much.
Diego