On 06/09/2016 02:07,
stch...@gmail.com wrote:
> W dniu poniedziałek, 22 sierpnia 2016 15:18:05 UTC+2 użytkownik David
> Perry napisał:
>> I have a 16 bit vector which I want to split into 2 8 bit vectors,
>> I thought I would be able to do this: (Tx_Byte_4, Tx_Byte_3) <=
>> INV_Volts; --this no worky I want to split the 16 bit voltage value
>> into 2 bytes to be transmitted later.
>>
>> Obviously I could avoid the problem by assigning (15:8) to byte 4
>> and (7:0) to byte 3 (I was doing this originally), but I am trying
>> to avoid doing that, it's not quite as neat :)
>>
>
> And Congratulations!! VHDL is a hardware description Language, and
> you should precisely assign wires to wires. VHDL is a strong typed HW
> description language enhirited from ADA. In fact, the declarations of
> signals and its types are very sensitive. Well, probably you have
> some bad behaviors taken from C language. I strongly prefare STRONGLY
> TYPED HDL languages. And also programming languages. Your problem is
> 100+% a reason of looking on HDL from a point of view of a C
> educated/bemused. The problem you described, occurs very often in a
> very similar situations in software developement (C "youngsters").
>
> C is an invitation to dissaster. Unfortunately, worldwide marketing
> made is a "standard". Pascal as a predecessor of C is a strong typed
> language. It's syntax is in fact quite similar to C, however it's
> more rigorous. What a f... for was C designed?! Well, not because
> programmers needed it, but just only because it was possible.
You need to have a look at the history of C. While it not as strongly
typed as some, it is better than assembler. The whole intention was
I think C sold itself. Despite lots of marketing it hasn't changed much.