Respect generics.
authorMalte S. Stretz <mss@apache.org>
Wed, 15 Jul 2009 12:08:02 +0000 (14:08 +0200)
committerMalte S. Stretz <mss@apache.org>
Wed, 15 Jul 2009 12:08:02 +0000 (14:08 +0200)
fhw_rs232/rs232_send.vhd

index ec5a09d..14a856a 100644 (file)
@@ -52,8 +52,9 @@ begin
     else '1';
   
   frame_s(frame_t'high) <= '0';
-  frame_s(frame_t'high - 1 downto frame_t'high - 8) <= txd;
-  frame_s(frame_t'low + 1) <= get_parity(txd, parity_type);
+  frame_s(frame_t'high - 1 downto frame_t'high - data_width) <= txd;
+  frame_s(frame_t'low + 1) <= get_parity(txd, parity_type) when parity_enabled = '1'
+                         else '1';
   frame_s(frame_t'low) <= '1';