Permalink
Browse files

add VHDL versions of the KISS files

  • Loading branch information...
1 parent 1eec040 commit e11736c116647c8e1bbdb20308b8d99d90833c57 @chastell committed Mar 12, 2010
Showing with 46,824 additions and 0 deletions.
  1. +114 −0 kiss/bbara_hot.vhd
  2. +114 −0 kiss/bbara_jed.vhd
  3. +114 −0 kiss/bbara_nov.vhd
  4. +114 −0 kiss/bbara_rnd.vhd
  5. +128 −0 kiss/bbsse_hot.vhd
  6. +128 −0 kiss/bbsse_jed.vhd
  7. +128 −0 kiss/bbsse_nov.vhd
  8. +128 −0 kiss/bbsse_rnd.vhd
  9. +66 −0 kiss/bbtas_hot.vhd
  10. +66 −0 kiss/bbtas_jed.vhd
  11. +66 −0 kiss/bbtas_nov.vhd
  12. +66 −0 kiss/bbtas_rnd.vhd
  13. +73 −0 kiss/beecount_hot.vhd
  14. +73 −0 kiss/beecount_jed.vhd
  15. +73 −0 kiss/beecount_nov.vhd
  16. +73 −0 kiss/beecount_rnd.vhd
  17. +163 −0 kiss/cse_hot.vhd
  18. +163 −0 kiss/cse_jed.vhd
  19. +163 −0 kiss/cse_nov.vhd
  20. +163 −0 kiss/cse_rnd.vhd
  21. +101 −0 kiss/dk14_hot.vhd
  22. +101 −0 kiss/dk14_jed.vhd
  23. +101 −0 kiss/dk14_nov.vhd
  24. +101 −0 kiss/dk14_rnd.vhd
  25. +68 −0 kiss/dk15_hot.vhd
  26. +68 −0 kiss/dk15_jed.vhd
  27. +68 −0 kiss/dk15_nov.vhd
  28. +68 −0 kiss/dk15_rnd.vhd
  29. +213 −0 kiss/dk16_hot.vhd
  30. +213 −0 kiss/dk16_jed.vhd
  31. +213 −0 kiss/dk16_nov.vhd
  32. +213 −0 kiss/dk16_rnd.vhd
  33. +80 −0 kiss/dk17_hot.vhd
  34. +80 −0 kiss/dk17_jed.vhd
  35. +80 −0 kiss/dk17_nov.vhd
  36. +80 −0 kiss/dk17_rnd.vhd
  37. +59 −0 kiss/dk27_hot.vhd
  38. +59 −0 kiss/dk27_jed.vhd
  39. +59 −0 kiss/dk27_nov.vhd
  40. +59 −0 kiss/dk27_rnd.vhd
  41. +99 −0 kiss/dk512_hot.vhd
  42. +99 −0 kiss/dk512_jed.vhd
  43. +99 −0 kiss/dk512_nov.vhd
  44. +99 −0 kiss/dk512_rnd.vhd
  45. +192 −0 kiss/donfile_hot.vhd
  46. +192 −0 kiss/donfile_jed.vhd
  47. +192 −0 kiss/donfile_nov.vhd
  48. +192 −0 kiss/donfile_rnd.vhd
  49. +222 −0 kiss/ex1_hot.vhd
  50. +222 −0 kiss/ex1_jed.vhd
  51. +222 −0 kiss/ex1_nov.vhd
  52. +222 −0 kiss/ex1_rnd.vhd
  53. +151 −0 kiss/ex2_hot.vhd
  54. +151 −0 kiss/ex2_jed.vhd
  55. +151 −0 kiss/ex2_nov.vhd
  56. +151 −0 kiss/ex2_rnd.vhd
  57. +88 −0 kiss/ex3_hot.vhd
  58. +88 −0 kiss/ex3_jed.vhd
  59. +88 −0 kiss/ex3_nov.vhd
  60. +88 −0 kiss/ex3_rnd.vhd
  61. +87 −0 kiss/ex4_hot.vhd
  62. +87 −0 kiss/ex4_jed.vhd
  63. +87 −0 kiss/ex4_nov.vhd
  64. +87 −0 kiss/ex4_rnd.vhd
  65. +81 −0 kiss/ex5_hot.vhd
  66. +81 −0 kiss/ex5_jed.vhd
  67. +81 −0 kiss/ex5_nov.vhd
  68. +81 −0 kiss/ex5_rnd.vhd
  69. +82 −0 kiss/ex6_hot.vhd
  70. +82 −0 kiss/ex6_jed.vhd
  71. +82 −0 kiss/ex6_nov.vhd
  72. +82 −0 kiss/ex6_rnd.vhd
  73. +88 −0 kiss/ex7_hot.vhd
  74. +88 −0 kiss/ex7_jed.vhd
  75. +88 −0 kiss/ex7_nov.vhd
  76. +88 −0 kiss/ex7_rnd.vhd
  77. +251 −0 kiss/keyb_hot.vhd
  78. +251 −0 kiss/keyb_jed.vhd
  79. +251 −0 kiss/keyb_nov.vhd
  80. +251 −0 kiss/keyb_rnd.vhd
  81. +441 −0 kiss/kirkman_hot.vhd
  82. +441 −0 kiss/kirkman_jed.vhd
  83. +441 −0 kiss/kirkman_nov.vhd
  84. +441 −0 kiss/kirkman_rnd.vhd
  85. +76 −0 kiss/lion9_hot.vhd
  86. +76 −0 kiss/lion9_jed.vhd
  87. +76 −0 kiss/lion9_nov.vhd
  88. +76 −0 kiss/lion9_rnd.vhd
  89. +47 −0 kiss/lion_hot.vhd
  90. +47 −0 kiss/lion_jed.vhd
  91. +47 −0 kiss/lion_nov.vhd
  92. +47 −0 kiss/lion_rnd.vhd
  93. +94 −0 kiss/mark1_hot.vhd
  94. +94 −0 kiss/mark1_jed.vhd
  95. +94 −0 kiss/mark1_nov.vhd
  96. +94 −0 kiss/mark1_rnd.vhd
  97. +46 −0 kiss/mc_hot.vhd
  98. +46 −0 kiss/mc_jed.vhd
  99. +46 −0 kiss/mc_nov.vhd
  100. +46 −0 kiss/mc_rnd.vhd
  101. +84 −0 kiss/modulo12_hot.vhd
  102. +84 −0 kiss/modulo12_jed.vhd
  103. +84 −0 kiss/modulo12_nov.vhd
  104. +84 −0 kiss/modulo12_rnd.vhd
  105. +78 −0 kiss/opus_hot.vhd
  106. +78 −0 kiss/opus_jed.vhd
  107. +78 −0 kiss/opus_nov.vhd
  108. +78 −0 kiss/opus_rnd.vhd
  109. +283 −0 kiss/planet_hot.vhd
  110. +283 −0 kiss/planet_jed.vhd
  111. +283 −0 kiss/planet_nov.vhd
  112. +283 −0 kiss/planet_rnd.vhd
  113. +169 −0 kiss/pma_hot.vhd
  114. +169 −0 kiss/pma_jed.vhd
  115. +169 −0 kiss/pma_nov.vhd
  116. +169 −0 kiss/pma_rnd.vhd
  117. +419 −0 kiss/s1488_hot.vhd
  118. +419 −0 kiss/s1488_jed.vhd
  119. +419 −0 kiss/s1488_nov.vhd
  120. +419 −0 kiss/s1488_rnd.vhd
  121. +418 −0 kiss/s1494_hot.vhd
  122. +418 −0 kiss/s1494_jed.vhd
  123. +418 −0 kiss/s1494_nov.vhd
  124. +418 −0 kiss/s1494_rnd.vhd
  125. +191 −0 kiss/s1_hot.vhd
  126. +191 −0 kiss/s1_jed.vhd
  127. +191 −0 kiss/s1_nov.vhd
  128. +191 −0 kiss/s1_rnd.vhd
  129. +191 −0 kiss/s1a_hot.vhd
  130. +191 −0 kiss/s1a_jed.vhd
  131. +191 −0 kiss/s1a_nov.vhd
  132. +191 −0 kiss/s1a_rnd.vhd
  133. +231 −0 kiss/s208_hot.vhd
  134. +231 −0 kiss/s208_jed.vhd
  135. +231 −0 kiss/s208_nov.vhd
  136. +231 −0 kiss/s208_rnd.vhd
  137. +76 −0 kiss/s27_hot.vhd
  138. +76 −0 kiss/s27_jed.vhd
  139. +76 −0 kiss/s27_nov.vhd
  140. +76 −0 kiss/s27_rnd.vhd
  141. +1,774 −0 kiss/s298_hot.vhd
  142. +1,774 −0 kiss/s298_jed.vhd
  143. +1,774 −0 kiss/s298_nov.vhd
  144. +1,774 −0 kiss/s298_rnd.vhd
  145. +127 −0 kiss/s386_hot.vhd
  146. +127 −0 kiss/s386_jed.vhd
  147. +127 −0 kiss/s386_nov.vhd
  148. +127 −0 kiss/s386_rnd.vhd
  149. +215 −0 kiss/s420_hot.vhd
  150. +215 −0 kiss/s420_jed.vhd
  151. +215 −0 kiss/s420_nov.vhd
  152. +215 −0 kiss/s420_rnd.vhd
  153. +242 −0 kiss/s510_hot.vhd
  154. +242 −0 kiss/s510_jed.vhd
  155. +242 −0 kiss/s510_nov.vhd
  156. +242 −0 kiss/s510_rnd.vhd
  157. +331 −0 kiss/s820_hot.vhd
  158. +331 −0 kiss/s820_jed.vhd
  159. +331 −0 kiss/s820_nov.vhd
  160. +331 −0 kiss/s820_rnd.vhd
  161. +344 −0 kiss/s832_hot.vhd
  162. +344 −0 kiss/s832_jed.vhd
  163. +344 −0 kiss/s832_nov.vhd
  164. +344 −0 kiss/s832_rnd.vhd
  165. +59 −0 kiss/s8_hot.vhd
  166. +59 −0 kiss/s8_jed.vhd
  167. +59 −0 kiss/s8_nov.vhd
  168. +59 −0 kiss/s8_rnd.vhd
  169. +304 −0 kiss/sand_hot.vhd
  170. +304 −0 kiss/sand_jed.vhd
  171. +304 −0 kiss/sand_nov.vhd
  172. +304 −0 kiss/sand_rnd.vhd
  173. +555 −0 kiss/scf_hot.vhd
  174. +555 −0 kiss/scf_jed.vhd
  175. +555 −0 kiss/scf_nov.vhd
  176. +555 −0 kiss/scf_rnd.vhd
  177. +64 −0 kiss/shiftreg_hot.vhd
  178. +64 −0 kiss/shiftreg_jed.vhd
  179. +64 −0 kiss/shiftreg_nov.vhd
  180. +64 −0 kiss/shiftreg_rnd.vhd
  181. +128 −0 kiss/sse_hot.vhd
  182. +128 −0 kiss/sse_jed.vhd
  183. +128 −0 kiss/sse_nov.vhd
  184. +128 −0 kiss/sse_rnd.vhd
  185. +280 −0 kiss/styr_hot.vhd
  186. +280 −0 kiss/styr_jed.vhd
  187. +280 −0 kiss/styr_nov.vhd
  188. +280 −0 kiss/styr_rnd.vhd
  189. +85 −0 kiss/tav_hot.vhd
  190. +85 −0 kiss/tav_jed.vhd
  191. +85 −0 kiss/tav_nov.vhd
  192. +85 −0 kiss/tav_rnd.vhd
  193. +1,688 −0 kiss/tbk_hot.vhd
  194. +1,688 −0 kiss/tbk_jed.vhd
  195. +1,688 −0 kiss/tbk_nov.vhd
  196. +1,688 −0 kiss/tbk_rnd.vhd
  197. +128 −0 kiss/tma_hot.vhd
  198. +128 −0 kiss/tma_jed.vhd
  199. +128 −0 kiss/tma_nov.vhd
  200. +128 −0 kiss/tma_rnd.vhd
  201. +82 −0 kiss/train11_hot.vhd
  202. +82 −0 kiss/train11_jed.vhd
  203. +82 −0 kiss/train11_nov.vhd
  204. +82 −0 kiss/train11_rnd.vhd
  205. +50 −0 kiss/train4_hot.vhd
  206. +50 −0 kiss/train4_jed.vhd
  207. +50 −0 kiss/train4_nov.vhd
  208. +50 −0 kiss/train4_rnd.vhd
View
@@ -0,0 +1,114 @@
+library ieee;
+use ieee.numeric_std.all;
+use ieee.std_logic_1164.all;
+entity bbara_hot is
+ port(
+ clock: in std_logic;
+ input: in std_logic_vector(3 downto 0);
+ output: out std_logic_vector(1 downto 0)
+ );
+end bbara_hot;
+architecture behaviour of bbara_hot is
+ constant st0: std_logic_vector(9 downto 0) := "1000000000";
+ constant st1: std_logic_vector(9 downto 0) := "0100000000";
+ constant st4: std_logic_vector(9 downto 0) := "0010000000";
+ constant st2: std_logic_vector(9 downto 0) := "0001000000";
+ constant st3: std_logic_vector(9 downto 0) := "0000100000";
+ constant st7: std_logic_vector(9 downto 0) := "0000010000";
+ constant st5: std_logic_vector(9 downto 0) := "0000001000";
+ constant st6: std_logic_vector(9 downto 0) := "0000000100";
+ constant st8: std_logic_vector(9 downto 0) := "0000000010";
+ constant st9: std_logic_vector(9 downto 0) := "0000000001";
+ signal current_state, next_state: std_logic_vector(9 downto 0);
+begin
+ process(clock) begin
+ if rising_edge(clock) then current_state <= next_state;
+ end if;
+ end process;
+ process(input, current_state) begin
+ next_state <= "----------"; output <= "--";
+ case current_state is
+ when st0 =>
+ if std_match(input, "--01") then next_state <= st0; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st0; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st0; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st1 =>
+ if std_match(input, "--01") then next_state <= st1; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st1; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st1; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st2; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st2 =>
+ if std_match(input, "--01") then next_state <= st2; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st2; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st2; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st1; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st3; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st3 =>
+ if std_match(input, "--01") then next_state <= st3; output <= "10";
+ elsif std_match(input, "--10") then next_state <= st3; output <= "10";
+ elsif std_match(input, "--00") then next_state <= st3; output <= "10";
+ elsif std_match(input, "0011") then next_state <= st7; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st3; output <= "10";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st4 =>
+ if std_match(input, "--01") then next_state <= st4; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st4; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st4; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st5; output <= "00";
+ end if;
+ when st5 =>
+ if std_match(input, "--01") then next_state <= st5; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st5; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st5; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st4; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st6; output <= "00";
+ end if;
+ when st6 =>
+ if std_match(input, "--01") then next_state <= st6; output <= "01";
+ elsif std_match(input, "--10") then next_state <= st6; output <= "01";
+ elsif std_match(input, "--00") then next_state <= st6; output <= "01";
+ elsif std_match(input, "0011") then next_state <= st7; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st6; output <= "01";
+ end if;
+ when st7 =>
+ if std_match(input, "--01") then next_state <= st7; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st7; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st7; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st8; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st8 =>
+ if std_match(input, "--01") then next_state <= st8; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st8; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st8; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st9; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st9 =>
+ if std_match(input, "--01") then next_state <= st9; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st9; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st9; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when others => next_state <= "----------"; output <= "--";
+ end case;
+ end process;
+end behaviour;
View
@@ -0,0 +1,114 @@
+library ieee;
+use ieee.numeric_std.all;
+use ieee.std_logic_1164.all;
+entity bbara_jed is
+ port(
+ clock: in std_logic;
+ input: in std_logic_vector(3 downto 0);
+ output: out std_logic_vector(1 downto 0)
+ );
+end bbara_jed;
+architecture behaviour of bbara_jed is
+ constant st0: std_logic_vector(3 downto 0) := "0111";
+ constant st1: std_logic_vector(3 downto 0) := "0100";
+ constant st4: std_logic_vector(3 downto 0) := "0110";
+ constant st2: std_logic_vector(3 downto 0) := "0101";
+ constant st3: std_logic_vector(3 downto 0) := "0000";
+ constant st7: std_logic_vector(3 downto 0) := "0010";
+ constant st5: std_logic_vector(3 downto 0) := "1100";
+ constant st6: std_logic_vector(3 downto 0) := "1110";
+ constant st8: std_logic_vector(3 downto 0) := "0011";
+ constant st9: std_logic_vector(3 downto 0) := "1111";
+ signal current_state, next_state: std_logic_vector(3 downto 0);
+begin
+ process(clock) begin
+ if rising_edge(clock) then current_state <= next_state;
+ end if;
+ end process;
+ process(input, current_state) begin
+ next_state <= "----"; output <= "--";
+ case current_state is
+ when st0 =>
+ if std_match(input, "--01") then next_state <= st0; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st0; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st0; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st1 =>
+ if std_match(input, "--01") then next_state <= st1; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st1; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st1; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st2; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st2 =>
+ if std_match(input, "--01") then next_state <= st2; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st2; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st2; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st1; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st3; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st3 =>
+ if std_match(input, "--01") then next_state <= st3; output <= "10";
+ elsif std_match(input, "--10") then next_state <= st3; output <= "10";
+ elsif std_match(input, "--00") then next_state <= st3; output <= "10";
+ elsif std_match(input, "0011") then next_state <= st7; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st3; output <= "10";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st4 =>
+ if std_match(input, "--01") then next_state <= st4; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st4; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st4; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st5; output <= "00";
+ end if;
+ when st5 =>
+ if std_match(input, "--01") then next_state <= st5; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st5; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st5; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st4; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st6; output <= "00";
+ end if;
+ when st6 =>
+ if std_match(input, "--01") then next_state <= st6; output <= "01";
+ elsif std_match(input, "--10") then next_state <= st6; output <= "01";
+ elsif std_match(input, "--00") then next_state <= st6; output <= "01";
+ elsif std_match(input, "0011") then next_state <= st7; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st6; output <= "01";
+ end if;
+ when st7 =>
+ if std_match(input, "--01") then next_state <= st7; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st7; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st7; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st8; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st8 =>
+ if std_match(input, "--01") then next_state <= st8; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st8; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st8; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st9; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st9 =>
+ if std_match(input, "--01") then next_state <= st9; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st9; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st9; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when others => next_state <= "----"; output <= "--";
+ end case;
+ end process;
+end behaviour;
View
@@ -0,0 +1,114 @@
+library ieee;
+use ieee.numeric_std.all;
+use ieee.std_logic_1164.all;
+entity bbara_nov is
+ port(
+ clock: in std_logic;
+ input: in std_logic_vector(3 downto 0);
+ output: out std_logic_vector(1 downto 0)
+ );
+end bbara_nov;
+architecture behaviour of bbara_nov is
+ constant st0: std_logic_vector(3 downto 0) := "0100";
+ constant st1: std_logic_vector(3 downto 0) := "0000";
+ constant st2: std_logic_vector(3 downto 0) := "0010";
+ constant st3: std_logic_vector(3 downto 0) := "0011";
+ constant st4: std_logic_vector(3 downto 0) := "0001";
+ constant st5: std_logic_vector(3 downto 0) := "1101";
+ constant st6: std_logic_vector(3 downto 0) := "1100";
+ constant st7: std_logic_vector(3 downto 0) := "0111";
+ constant st8: std_logic_vector(3 downto 0) := "0110";
+ constant st9: std_logic_vector(3 downto 0) := "0101";
+ signal current_state, next_state: std_logic_vector(3 downto 0);
+begin
+ process(clock) begin
+ if rising_edge(clock) then current_state <= next_state;
+ end if;
+ end process;
+ process(input, current_state) begin
+ next_state <= "----"; output <= "--";
+ case current_state is
+ when st0 =>
+ if std_match(input, "--01") then next_state <= st0; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st0; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st0; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st1 =>
+ if std_match(input, "--01") then next_state <= st1; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st1; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st1; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st2; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st2 =>
+ if std_match(input, "--01") then next_state <= st2; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st2; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st2; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st1; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st3; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st3 =>
+ if std_match(input, "--01") then next_state <= st3; output <= "10";
+ elsif std_match(input, "--10") then next_state <= st3; output <= "10";
+ elsif std_match(input, "--00") then next_state <= st3; output <= "10";
+ elsif std_match(input, "0011") then next_state <= st7; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st3; output <= "10";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st4 =>
+ if std_match(input, "--01") then next_state <= st4; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st4; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st4; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st5; output <= "00";
+ end if;
+ when st5 =>
+ if std_match(input, "--01") then next_state <= st5; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st5; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st5; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st4; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st6; output <= "00";
+ end if;
+ when st6 =>
+ if std_match(input, "--01") then next_state <= st6; output <= "01";
+ elsif std_match(input, "--10") then next_state <= st6; output <= "01";
+ elsif std_match(input, "--00") then next_state <= st6; output <= "01";
+ elsif std_match(input, "0011") then next_state <= st7; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st6; output <= "01";
+ end if;
+ when st7 =>
+ if std_match(input, "--01") then next_state <= st7; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st7; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st7; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st8; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st8 =>
+ if std_match(input, "--01") then next_state <= st8; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st8; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st8; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st9; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when st9 =>
+ if std_match(input, "--01") then next_state <= st9; output <= "00";
+ elsif std_match(input, "--10") then next_state <= st9; output <= "00";
+ elsif std_match(input, "--00") then next_state <= st9; output <= "00";
+ elsif std_match(input, "0011") then next_state <= st0; output <= "00";
+ elsif std_match(input, "-111") then next_state <= st1; output <= "00";
+ elsif std_match(input, "1011") then next_state <= st4; output <= "00";
+ end if;
+ when others => next_state <= "----"; output <= "--";
+ end case;
+ end process;
+end behaviour;
Oops, something went wrong.

0 comments on commit e11736c

Please sign in to comment.