Comments (7)
I built now patmos using Quartus 19.1 and 20.1 and attached the log here.
What catches my eye is that the used resources increased from 18897 to 118824, but the RAM Segments were reduced from 322 to 190. The higher amount of resources is probably the reason why the fitting and routing process tackes 17 minutes instead of a few seconds.
Would be interesting why quartus uses logic cells instead of RAM cells
Synthesis log output of v19.1:
...
[0m[0;32mInfo (128003): Physical synthesis algorithm combinational resynthesis using boolean division complete: estimated slack improvement of 745 ps
[0m[0;32mInfo (128001): Physical synthesis optimizations for speed complete: elapsed time is 00:00:07
[0m[0;32mInfo (16010): Generating hard_block partition "hard_block:auto_generated_inst"
[0m[0;32m Info (16011): Adding 1 node(s), including 0 DDIO, 1 PLL, 0 transceiver and 0 LCELL
[0m[0;32mInfo (21057): Implemented 19285 device resources after synthesis - the final resource count might be different
[0m[0;32m Info (21058): Implemented 6 input pins
[0m[0;32m Info (21059): Implemented 35 output pins
[0m[0;32m Info (21060): Implemented 16 bidirectional pins
[0m[0;32m Info (21061): Implemented 18897 logic cells
[0m[0;32m Info (21064): Implemented 322 RAM segments
[0m[0;32m Info (21065): Implemented 1 PLLs
[0m[0;32m Info (21062): Implemented 8 DSP elements
[0m[0;32mInfo: Quartus Prime Analysis & Synthesis was successful. 0 errors, 33 warnings
[0m[0;32m Info: Peak virtual memory: 1337 megabytes
[0m[0;32m Info: Processing ended: Wed Sep 15 08:32:55 2021
[0m[0;32m Info: Elapsed time: 00:01:04
[0m[0;32m Info: Total CPU time (on all processors): 00:01:13
...
Synthesis log output of v20.1:
...
[0m[0;32mInfo (128003): Physical synthesis algorithm combinational resynthesis using boolean division complete: estimated slack improvement of 330 ps
[0m[0;32mInfo (128001): Physical synthesis optimizations for speed complete: elapsed time is 00:00:27
[0m[0;32mInfo (16010): Generating hard_block partition "hard_block:auto_generated_inst"
[0m[0;32m Info (16011): Adding 1 node(s), including 0 DDIO, 1 PLL, 0 transceiver and 0 LCELL
[0m[0;32mInfo (21057): Implemented 119080 device resources after synthesis - the final resource count might be different
[0m[0;32m Info (21058): Implemented 6 input pins
[0m[0;32m Info (21059): Implemented 35 output pins
[0m[0;32m Info (21060): Implemented 16 bidirectional pins
[0m[0;32m Info (21061): Implemented 118824 logic cells
[0m[0;32m Info (21064): Implemented 190 RAM segments
[0m[0;32m Info (21065): Implemented 1 PLLs
[0m[0;32m Info (21062): Implemented 8 DSP elements
[0m[0;32mInfo: Quartus Prime Analysis & Synthesis was successful. 0 errors, 25 warnings
[0m[0;32m Info: Peak virtual memory: 1181 megabytes
[0m[0;32m Info: Processing ended: Wed Sep 15 09:49:49 2021
[0m[0;32m Info: Elapsed time: 00:02:48
[0m[0;32m Info: Total CPU time (on all processors): 00:02:57
...
build_log_quartus_20.1.log
build_log_quartus_19.1.log
from patmos.
I posted a question on Reddit, according to this the reason for the high usage of logic cells instead of using RAM Blocks is that there is asynchronous access to the RAM Block. Quartus 19.1 infered pass through logic where v20.1 uninferes RAM Blocks and uses logic cells.
It looks like there is an issue with the generated verilog code from chisel.
Synthesis log output of v19.1:
...
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_4:tagMem|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_5:MemBlock_3|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|StackCache:sc|MemBlock_9:MemBlock_3|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|Exceptions:exc|vec_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_5:MemBlock_1|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|StackCache:sc|MemBlock_9:MemBlock_1|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_5:MemBlock_2|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|StackCache:sc|MemBlock_9:MemBlock_2|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_5:MemBlock|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|StackCache:sc|MemBlock_9:MemBlock|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|UartCmp:UartCmp|Uart:uart|QueueCompatibility:txQueue|ram_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|Exceptions:exc|vecDup_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|Fetch:fetch|MemBlock_2:MemBlock_1|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|Fetch:fetch|MemBlock_2:MemBlock|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|MCache:icache|MCacheMem:mem|MemBlock:mcacheEven|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|MCache:icache|MCacheMem:mem|MemBlock:mcacheOdd|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|UartCmp:UartCmp|Uart:uart|QueueCompatibility:rxQueue|ram_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
...
Synthesis log output of v20.1:
...
[[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|StackCache:sc|MemBlock_9:MemBlock_3|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|StackCache:sc|MemBlock_9:MemBlock_1|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|StackCache:sc|MemBlock_9:MemBlock_2|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|StackCache:sc|MemBlock_9:MemBlock|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|Exceptions:exc|vecDup_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|Fetch:fetch|MemBlock_2:MemBlock_1|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|Fetch:fetch|MemBlock_2:MemBlock|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|MCache:icache|MCacheMem:mem|MemBlock:mcacheEven|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;36mWarning (276020): Inferred RAM node "Patmos:comp|PatmosCore:cores_0|MCache:icache|MCacheMem:mem|MemBlock:mcacheOdd|mem_rtl_0" from synchronous design logic. Pass-through logic has been added to match the read-during-write behavior of the original design.
[0m[0;32mInfo (276014): Found 12 instances of uninferred RAM logic
[0m[0;32m Info (276007): RAM logic "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_4:tagMem|mem" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 6420
[0m[0;32m Info (276007): RAM logic "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_5:MemBlock_3|mem" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 6523
[0m[0;32m Info (276007): RAM logic "Patmos:comp|PatmosCore:cores_0|Exceptions:exc|vec" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 5454
[0m[0;32m Info (276007): RAM logic "Patmos:comp|Spm:Spm|MemBlock_9:MemBlock_3|mem" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 12292
[0m[0;32m Info (276007): RAM logic "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_5:MemBlock_1|mem" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 6523
[0m[0;32m Info (276007): RAM logic "Patmos:comp|Spm:Spm|MemBlock_9:MemBlock_1|mem" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 12292
[0m[0;32m Info (276007): RAM logic "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_5:MemBlock_2|mem" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 6523
[0m[0;32m Info (276007): RAM logic "Patmos:comp|Spm:Spm|MemBlock_9:MemBlock_2|mem" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 12292
[0m[0;32m Info (276007): RAM logic "Patmos:comp|PatmosCore:cores_0|DataCache:dcache|DirectMappedCache:dm|MemBlock_5:MemBlock|mem" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 6523
[0m[0;32m Info (276007): RAM logic "Patmos:comp|Spm:Spm|MemBlock_9:MemBlock|mem" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 12292
[0m[0;32m Info (276007): RAM logic "Patmos:comp|UartCmp:UartCmp|Uart:uart|QueueCompatibility:txQueue|ram" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 14823
[0m[0;32m Info (276007): RAM logic "Patmos:comp|UartCmp:UartCmp|Uart:uart|QueueCompatibility:rxQueue|ram" is uninferred due to asynchronous read logic File: /opt/t-crest/patmos/hardware/build/Patmos.v Line: 14823
...
from patmos.
Please provide the link to the Reddit question.
Seems like we are dependent on an implementation detail (how Quatus infers stuff). Can we change the code to always use RAM regardless of Quatus version?
from patmos.
That is the link to the answer.
The generated code looks like the example to me. I skimmed through the settings of quartus but nothing really catched my eye.
Edit:
I just posted a question on the intel support forums maybe we get some hints there https://community.intel.com/t5/Intel-Quartus-Prime-Software/Uninferred-ram-due-to-asynchronous-read-logic-Quartus-19-1-vs-20/m-p/1315819#M70854
from patmos.
Mmh, this is very bad. I guess/hope we can fix this when changing some of the Chisel code. We used a dedicated register and an asynchronous RAM, where Quartus 19 could infer a block RAM, which has a register input. Chisel has also a SyncRam, where the register is implicit. Maybe that would then work in Quartus 20.
from patmos.
I think we should do the forwarding manual ourself.
from patmos.
Added forwarding to all memories, which almost solves this issue. All memories are now mapped to on-chip memories except the data cache. Don't know what the difference is, as all caches use the same MemBlock module.
from patmos.
Related Issues (20)
- Strange timing behavior in `patemu` when executing same code on multiple cores HOT 5
- Patmos emulator fails to build with Verilator >= 4.212 HOT 1
- 404 error during build HOT 1
- Patmos emulator fails to build with direct-mapped instruction cache HOT 3
- Patmos emulator hangs when starting a core thread on a CPU with index >= 8 in a 16-core config HOT 2
- The method cache is filled on every call and return, even if the target is already cached HOT 7
- Issue when building patmos with verilator HOT 1
- Python 2
- PC setting for Verilator
- Basys3 configuration is broken HOT 1
- emulator has dead code HOT 1
- Handbook: Calling convention regarding SRB,SRO,SXB,SXO HOT 1
- Patemu generates segfault when dumping VCD and limiting clock cycles at the same time HOT 2
- Handbook: ABI inconsistency around r20 HOT 2
- Patmos depends on Argo HOT 1
- Patmos build broken HOT 1
- Inconsistent tagging for PTP frames HOT 2
- Towards the compiler HOT 9
- Multicore devices are broken HOT 3
- handbook: pmov wrong definition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from patmos.