HDL FIFO and (not so) algebraic loop errors

조회 수: 1 (최근 30일)
Florian Rössing
Florian Rössing 2020년 9월 29일
댓글: Florian Rössing 2020년 9월 30일
Hi everyone, thanks for checking in on my question.
What I am trying to do is build a sorting network based on mergesort. For every sorting step I use a HDL FIFO Block to store the sorted results. The next sorting node will compare the outputs of wo fifos and togehter with some additional logic decide which value to forward. The corresponding fifo from the layer will be poped according to this decision. Therefor I loop back the pop from one stage to the previous stage.
This lead to an algebraic loop error in his pop signal. I could resolve this by use of an delay, but it will destroy the sorting. I was able to somehow resolve this error for my test setup, but after migrating the concept to my special problem, I could not get it to work again. Do you have any Ideas which settings might be involved in this error, that I might tweak to get it running?
I am sure, that actually there should not be an algeraic loop in the model at all, therefor I have trouble understanding what is going on.
Greetings and thanks in advance
Edit:
Uploaded the software here: https://www.mathworks.com/matlabcentral/fileexchange/80578-sorter-to-sort-4-presorted-datasets

채택된 답변

Florian Rössing
Florian Rössing 2020년 9월 30일
Good Morning,
have you ran testbench.m, which should also be in the folder minimalexample? It fills the parameters into the workspace in order to be capable of running the simulink file. I didnt know how to create all this in a simulink function block.
  댓글 수: 1
Florian Rössing
Florian Rössing 2020년 9월 30일
OK renaming the INP1_POP and INP2_POP in POP1 and POP2 resolves the issue for reasons i do not understand...

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Kiran Kintali
Kiran Kintali 2020년 9월 29일
Can you share the model with the algberaic loop error? What version of MATLAB and HDL Coder are you currently using? Thanks.
  댓글 수: 5
Florian Rössing
Florian Rössing 2020년 9월 29일
I now have added a minimal example that should be cappable to be run as standalone version. See: https://www.mathworks.com/matlabcentral/fileexchange/80578-sorter-to-sort-4-presorted-datasets in the folder minimalexample
Kiran Kintali
Kiran Kintali 2020년 9월 29일
Thank you. I need a model that does pass update diagram phase (ctrl-d) without initialization issues. It looks like few initialization of variables missing. it would be great if you can show the algebraic loop error.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by