Re: EXTERNAL: Re: [vhdl-200x] Directional records proposal

From: Jim Lewis <Jim@synthworks.com>
Date: Tue Jul 17 2012 - 10:01:38 PDT

Hi Daniel,
For resolution of the record, I think we want resolved elements
and not resolved records themselves. By having a resolution
function on the element, the record elements can be driven
from separate processes. I think when you resolve the entire
record, every process that drives an element puts a driver on
the entire record.

Having resolved elements also allows the problem to be approached
piecewise. For bit values, you can use std_logic or any resolved
array of std_ulogic (std_logic_vector, signed, unsigned, ...).
For my testbenches I also use integers, real, and time in the record,
so I have resolution functions for these.

Best,
Jim

> I think checking for the literal '-' doesn't work too well with matching case statements, so we'll have to remove the first "when" condition. Then our matching case statement becomes:
> case? (someRecordArray(0).i)(j) & (someRecordArray(1).i)(j) is
> when "UX" | "XU" => (resolvedRecord.i)(j) <= 'X';
> when "U-" => (resolvedRecord.i)(j) <= (someRecordArray(1).i)(j);
> when "-U" => (resolvedRecord.i)(j) <= (someRecordArray(0).i)(j);
>
> when "X-" | "-X" => (resolvedRecord.i)(j) <= 'X';
> when "W-" | "-W" => (resolvedRecord.i)(j) <= 'W';
> when "ZZ" => (resolvedRecord.i)(j) <= 'Z';
> when "Z-" => (resolvedRecord.i)(j) <= (someRecordArray(1).i)(j);
> when "-Z" => (resolvedRecord.i)(j) <= (someRecordArray(0).i)(j);
>
> when "10" | "01" => (resolvedRecord.i)(j) <= 'X';
> when "HH" => (resolvedRecord.i)(j) <= 'H';
> when "11" | "1H" | "H1" => (resolvedRecord.i)(j) <= '1';
> when "00" | "0L" | "L0" => (resolvedRecord.i)(j) <= '0';
> when others => (resolvedRecord.i)(j) <= 'X';
> end case?;
>
> A question that arises is how do we check for the literal '-' in a matching case statement? I wan't to check for the literal '-' and not treat the literal as a don't care. But for the rest of the
> "when" conditions, I would like the matching case statement to treat '-' as don't cares instead of literals.
>
> My intention:
> when "--" => (resolvedRecord.i)(j) <= '-';
> checks for the string literal "--", and not treat them as don't cares.
>
> But the '-' within this "when" clause
> when "Z-" => (resolvedRecord.i)(j) <= (someRecordArray(1).i)(j);
> should be treated as a don't care.
>
> regards, daniel
>

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training             mailto:Jim@SynthWorks.com
SynthWorks Design Inc.           http://www.SynthWorks.com
1-503-590-4787
Jumpstart your VHDL Verification with our OSVVM Bootcamp training
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Tue Jul 17 09:59:55 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 17 2012 - 10:00:14 PDT