有人可以帮我提供一个链接,通过VHDL中的有限状态机提供存储器和控制单元的设计吗?
我需要设计电路的架构。
非常感谢!
答案 0 :(得分:0)
有很多在线资源可以帮助您。例如here:
architecture style_87 of memory is
begin
memory:
process (cs)
-----------------------
variable ram : ram_type;
-----------------------
variable address : natural;
begin
if rising_edge(cs) then
address := sulv_to_natural(add_in);
if (mwrite = '1') then
ram(address) := data_in;
end if;
data_out <= ram(address);
end if;
end process;
end style_87;
或here:
process(currentstate, a)
begin
b <= '1';
c <= '1';
case currentstate is
when s1 =>
if (a = '1') then
c <= '0';
end if;
nextstate <= s2;
when s2 =>
-- b doesnt change state from s1 to here, do I need to define what it is here?
if (a /= '1') then
c <= '0';
end if;
nextstate <= s3;
when s3 =>
if (a = '1') then
b <= '0';
c <= '0';
end if;
nextstate <= s1;
end case;
end process;
我相信你可以自己谷歌很多其他的例子。
答案 1 :(得分:0)
CHAPTER 10 FINITE STATE MACHINE:PRINCIPLE AND PRACTICE(PDF,274KB),使用VHDL的RTL硬件设计,效率,可移植性和可扩展性的编码。
请参见图10.3内存控制器FSM的状态图。请注意,本章并未直接演示模型,它教您设计一个所需的一切,而不是专注于特定于实现的设备时序,或特别是内存控制器。
在一些课程幻灯片中可以找到相同的状态图,Hardware Design with VHDL Finite State Machines ECE 443以及其他章节内容和一些实现内存控制器的VHDL源。