I am working on a Mixed signal model where the symbol looks like the following,

The signal to the left is count_val which is std_logic_vector(7 downto 0) and p,m are the terminals which have qunatities voltage v and current I.
Its a very simple code where we have to use the count_val to calculate the current i. In simple terms it should be like this, I == 0.00003 * count_val.
But since count val is std_logic_vector and I is a "quantity" which is analog this makes the above formula hard to implement. I tried to convert the count_val to an integer type and use it in the forumla but still no luck and the forumula 'I == ' accepts only quantities in it and not signals or std_logics . Is there a way to crack this issue ?
The overal block diagram looks like this and at the bottom where the contolable current sink is, is where I am stuck as I am not able to controll the current sink with the counter due to the above mentioned reasons.
