赛灵思
直播中

李宏

7年用户 174经验值
私信 关注
[问答]

无法在BRAM中安装FSM(FSM_STYLE)

嗨,
我想在我的VHDL代码中使用fsm_style属性来在SpartanXC3S200AN设备中的BRAM中实现我的状态机。
我在综合后得到的代码和警告如下:
HDL代码
arcihtecture bla bla ...
-  statestype状态是(STATE1,STATE2,STATE3,STATE4,STATE5,STATE6,STATE7);信号状态:states:= STATE1;
属性fsm_style:string;属性fsm_style:信号是“bram”;
-----------------------------
合成报告中的警告
警告:Xst:1808  - 无法在BRAM中安装FSM(此设备中没有足够的BRAM)。分析FSM以获得最佳编码。使用单热编码优化FSM信号.-----------
------------国家|
编码----------------------- STATE1 |
0000001STATE2 |
0000010STATE3 |
0000100STATE4 |
0010000STATE5 |
0001000STATE6 |
0100000STATE7 |
百万-----------------------
当设备内部有7个状态的16个BRAM时,合成器如何表示(此设备中没有足够的BRAM)?
提前致谢,
bbinb

以上来自于谷歌翻译


以下为原文

Hi,

I wanted to use fsm_style attribute in my VHDL code to implement my state machine in BRAM in a Spartan XC3S200AN device. The code and warning I got after synthesis is below:

HDL CODE

arcihtecture bla bla ...

-- states
type states is (STATE1, STATE2, STATE3, STATE4, STATE5, STATE6, STATE7);
signal state : states := STATE1;

attribute fsm_style : string;
attribute fsm_style of state : signal is "bram";
-----------------------------


WARNING in SYNTHESIS REPORT

WARNING:Xst:1808 - Unable to fit FSM in BRAM (there are not enough BRAM in this device).
Analyzing FSM for best encoding.
Optimizing FSM on signal with one-hot encoding.
-----------------------
State | Encoding
-----------------------
STATE1 | 0000001
STATE2 | 0000010
STATE3 | 0000100
STATE4 | 0010000
STATE5 | 0001000
STATE6 | 0100000
STATE7 | 1000000
-----------------------

How can synthesizer says (there are not enough BRAM in this device) when the device has 16 BRAMs inside for 7 states ?

Thanks in advance,

bbinb

回帖(15)

黄淳

2019-4-1 12:42:02
bbinb写道:
感谢你的回答。
我之所以希望将BRAM用于状态机实现,是因为在Xilinx培训视频中建议,如果设备中的逻辑资源不足,则尝试使用状态机的BRAM来为额外的逻辑资源腾出空间。
说实话,我从来没有将BRAM实现用于状态机。
(它带来了使用EPROM和PAL作为计数器来实现状态机的不良记忆。)我认为基于BRAM的实现是否更高效取决于设计。
因此,我认为在看到这些结果后,将BRAM用于状态机并不是一个好主意。
我的意思是在我的代码中使用一个简单的状态机2使用BRAM。
国家机器由50多个州组成!
或者HDL编码应该使用较少的BRAM用于状态机。
我认为你应该以一种使其可维护的方式对状态机进行编码,并且如果资源不足或者你没有达到时间安排就会担心优化问题。
----------------------------是的,我这样做是为了谋生。
在原帖中查看解决方案

以上来自于谷歌翻译


以下为原文

bbinb wrote:
Thanks for the answer. The reason I wanted to use BRAM for state machine implementation, because it is suggested in one of Xilinx training videos that trying utilizing BRAMs for state machines in order to make room for extra logic resources if the logic resources are not enough in the device.
to be honest, I've never used the BRAM implementation for state machines. (It brings back bad memories of using an EPROM and a PAL for a counter to implement state machines.) I suppose that whether the BRAM-based implementation is more efficient is dependent on the design.
So I think utilizing BRAM for state machine is not a good idea after seeing these results. I mean for a simple state machine in my code 2 BRAM is utilized. What about state machines consist of more than 50 states ! Or the HDL coding should be in a way that it utilizes less BRAM for state machines.
I suppose that you should code the state machine in a way that makes it maintainable, and worry about optimization if you run out of resources or you don't meet timing.
----------------------------Yes, I do this for a living.View solution in original post
举报

赵雪培

2019-4-1 12:58:54
你好@ bbinb,
您可以尝试使用-use_new_parser设置为yes运行综合。
你需要编写-use_new_parser yesIn综合过程属性:
--Syed
--------------------------------------------------
--------------------------------------------请注意 - 请注明
答案为“接受为解决方案”,如果提供的信息是有帮助的。给予您认为有用的帖子。感谢 -
------------------------- ------------------------
-------------------
--------------------------------------------------
-------------------------------------------请注意 - 请标记答案
如果提供的信息有用,请“接受为解决方案”。给予您认为有用并回复导向的帖子。感谢Kudos .------------------------
--------------------------------------------------
-------------------

以上来自于谷歌翻译


以下为原文

Hello @bbinb,
 
Can you try running synthesis with -use_new_parser set to yes. 
 
You need to write -use_new_parser  yes In Synthesis process properties:

 
--Syed
 
--------------------------------------------------​--------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
---------------------------------------------------------------------------------------------
举报

赵雪培

2019-4-1 13:04:28
嗨@ bbinb,
检查您的FSM是否使用异步复位,如果FSM具有异步复位,则无法使用Block RAM实现。
有关ISE中FSM编码样式的更多信息/示例,请参阅以下用户指南
http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_7/xst.pdf
--Syed
--------------------------------------------------
--------------------------------------------请注意 - 请注明
答案为“接受为解决方案”,如果提供的信息是有帮助的。给予您认为有用的帖子。感谢 -
------------------------- ------------------------
-------------------
--------------------------------------------------
-------------------------------------------请注意 - 请标记答案
如果提供的信息有用,请“接受为解决方案”。给予您认为有用并回复导向的帖子。感谢Kudos .------------------------
--------------------------------------------------
-------------------

以上来自于谷歌翻译


以下为原文

Hi @bbinb,
 
Check if your FSM is using asynchronous reset as if FSM has an asynchronous reset, it cannot be implemented using block RAM. 
 
You can refer to following user guide for more information/example FSM coding styles in ISE
http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_7/xst.pdf
 
--Syed
 
--------------------------------------------------​--------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
---------------------------------------------------------------------------------------------
举报

侯晓萃

2019-4-1 13:14:00
嗨Syed,
我试过你说的但你的建议不起作用。

以上来自于谷歌翻译


以下为原文

Hi Syed,
 
I tried what you said but your suggestion did not work.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分