J
Joshdak
Guest
If I have for example:
signal mytest: std_logic_vector(9 downto 0);
type storage is array (0 to 7,0 to 7) of real;
top: process
variable test_storage : storage := (
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
);
Then I want to do, actually, in pseudo code:
mytest <= test_storage(4,5);
But how to do this ? I would acutally like to do this for several types of
precision for the data, for example - in pseudo iw would like something
like:
variable test_storage : storage := 2^8 * (
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
);
mytest <= test_storage(4,5); -- could I do this or similar?
Best Regards
signal mytest: std_logic_vector(9 downto 0);
type storage is array (0 to 7,0 to 7) of real;
top: process
variable test_storage : storage := (
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
);
Then I want to do, actually, in pseudo code:
mytest <= test_storage(4,5);
But how to do this ? I would acutally like to do this for several types of
precision for the data, for example - in pseudo iw would like something
like:
variable test_storage : storage := 2^8 * (
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
(1.345,1.1450,1.1220,1.1530,1.1550,1.1550,0.1550,0.155.0),
);
mytest <= test_storage(4,5); -- could I do this or similar?
Best Regards