0

我正在用 VHDL 语言编写代码,并且我想要实现一些东西:一系列 FSM 情况。

所以我写如下: type C_state_type is (IDLE_C, X_chk_C, O_chk_C, tmp_draw_C);
信号 cur_st_C,nxt_st_C 是 C_state_type 的数组(1 到 n);

知道这是否可以以某种方式实现吗?如果是这样,我应该改变什么?因为modelsim不同意这一点。

谢谢,阿米泰

4

1 回答 1

1

也将数组定义为 TYPE。然后将信号定义为您的数组。例如

type C_state_type is (IDLE_C, X_chk_C, O_chk_C, tmp_draw_C);
type C_state_array is array (1 to n) of C_state_type;
signal cur_st_C, nxt_st_C: C_state_array;
于 2013-07-05T08:08:12.703 回答