vhdl - 信号countris不能合成,同步描述不好
问题描述
entity T3 is
Port ( clk : in STD_LOGIC;
rise : out integer range 0 to 10;
fall : out integer range 0 to 10);
end T3;
architecture Behavioral of T3 is
--assigning signals to count falling and rising edge
signal countfal: integer range 0 to 10 :=0;
signal countris: integer range 0 to 10 :=0; --rising edge
begin
process(clk)
begin
--count upto 10 clocks
for i in 0 to 10 loop
if (falling_edge(clk)) then countfal<= countfal+1;
elsif(rising_edge(clk)) then countris<= countris+1;
end if;
end loop;
-- Output both counters
rise<=countris;
fall<=countfal;
end process;
end Behavioral;
*** 我正在尝试计算时钟的上升沿和下降沿,但出现此错误信号计数无法合成,同步描述错误。***
解决方案
推荐阅读
- angular - ng-sidebar 在嵌套模块的组件中不起作用
- ios - GMSMarker infoWindow 未更新
- javascript - 警告 ESLint 规则下的意外未命名函数 func-names
- react-native - undefined 不是函数(评估导航(屏幕))
- types - 如何在 Kotlin 中声明具有两种类型的变量,例如 val x: Int 或 String
- json - 如何分别提取 JSON 路径?
- c# - 具有透明模糊形式的圆角窗角
- c# - 使用 Newtonsoft.Json 对实体框架代理类进行序列化失败,并显示对象已处置的错误
- elasticsearch - 嵌套字段的术语查询在 Elasticsearch 中不返回任何结果
- xpath - 如何在此代码中进行 xpath 注入?