RoaLogic / ahb3lite_apb_bridge

Parameterised Asynchronous AHB3-Lite to APB4 Bridge.
Other
40 stars 19 forks source link

DC compiler incorrectly synthesises ahb to apb bridge #6

Open FireFox317 opened 2 years ago

FireFox317 commented 2 years ago

First of all thanks for this IP, I'm using it in a research project on the University of Twente in the Netherlands.

However in commit 18d9aee1a3f5e97a7ab404067b02ca5286caf344 you introduced resetting some state to 'X's. When using the DC compiler in optimizing mode (compile_ultra) this generates logic that is incorrect. I'm not sure if this is a bug in the DC compiler or not, but my issue was fixed by changing the x's in the file to 0's.

It's even worse that this was not caught by formality.

To be clear when doing a post-synthesis simulation it would end up in a undefined (x's) state when trying to convert an ahb to apb transaction.

rherveille commented 2 years ago

Design Compiler should treat an ‘X’ as don’t care. Resetting to ‘x’ would mean no reset. Resetting to 0 is fine. Out of curiosity, what did DC generate? Did you run formality on RTL vs netlist?

Richard

Sent from my iPhone

On 18 Aug 2022, at 20:29, Timon Kruiper @.***> wrote:



First of all thanks for this IP, I'm using it in a research project on the University of Twente in the Netherlands.

However in commit 18d9aeehttps://github.com/RoaLogic/ahb3lite_apb_bridge/commit/18d9aee1a3f5e97a7ab404067b02ca5286caf344 you introduced resetting some state to 'X's. When using the DC compiler in optimizing mode (compile_ultra) this generates logic that is incorrect. I'm not sure if this is a bug in the DC compiler or not, but my issue was fixed by changing the x's in the file to 0's.

— Reply to this email directly, view it on GitHubhttps://github.com/RoaLogic/ahb3lite_apb_bridge/issues/6, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADYKSCIXFJF6U7GM2TCH6NDVZZXI7ANCNFSM5656L6QA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

FireFox317 commented 2 years ago

Hi Richard,

Yes, I did run formality on the RTL vs the netlist and it was succesful, this was however with the IP integrated into a bigger system. I will do it on this IP soon, don't have time for that now. I'm not sure if DC compiler treats not resetting versus resetting to x's the same tho.

I did notice that when a transaction started, the lower bits of apb_beat_cnt were only initialized, the higher bits stayed as x's. My guess is that DC compiler can optimized some logic regarding the apb_beats function, but i'm not completely sure.

Regards, Timon