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

From: Brent Hayhoe <Brent.Hayhoe@Aftonroy.com>
Date: Tue Jul 17 2012 - 14:41:06 PDT

I agree with Jim. It seems a much more logical approach to the resolution problem.

On 17/07/2012 18:01, Jim Lewis wrote:
> 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
>>

-- 
Regards,
         Brent Hayhoe.
Aftonroy Limited                            Telephone: +44 (0)20-8449-1852
135 Lancaster Road,
New Barnet,                                    Mobile: +44 (0)79-6647-2574
Herts., EN4 8AJ,  U.K.                          Email: Brent.Hayhoe@Aftonroy.com
Registered Number: 1744190 England.
Registered Office:
4th Floor, Imperial House,
15 Kingsway,
London, WC2B 6UN, U.K.
Received on Tue Jul 17 14:41:11 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 17 2012 - 14:41:13 PDT