Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patmos emulator fails to build with direct-mapped instruction cache #109

Open
michael-platzer opened this issue Dec 22, 2021 · 3 comments
Open

Comments

@michael-platzer
Copy link
Contributor

Patmos emulator fails to build when the method cache is replaced by a direct-mapped instruction cache in hardware/config/default.xml:

-  <ICache type="method" size="8k" assoc="16" repl="fifo" />
+  <ICache type="line" size="8k" assoc="1" repl="dm" />

Several exceptions are raised during the build process:

Patmos configuration "default configuration for DE2-115 board"
	Frequency: 80 MHz
	Pipelines: 2
	Cores: 1
	Instruction cache: 8 KB, direct-mapped
	Data cache: 4 KB, direct-mapped, write through
	Stack cache: 2 KB
	Instruction SPM: 1 KB
	Data SPM: 2 KB
	Addressable external memory: 2 MB
	MMU: false
	Burst length: 4

[info] [2.097] Done elaborating.
[error] (run-main-0) firrtl.passes.PassExceptions: 
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 103:20]: [module ICache]  Expression ctrl.io.ctrlrepl is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 106:20]: [module ICache]  Expression ctrl.io.ocp_port is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 106:20]: [module ICache]  Expression io.ocp_port is used as a SourceFlow but can only be used as a SinkFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 107:16]: [module ICache]  Expression ctrl.io.perf is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 111:20]: [module ICache]  Expression repl.io.icachefe is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 112:20]: [module ICache]  Expression repl.io.replctrl is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 114:17]: [module ICache]  Expression repl.io.memIn is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.PassException: 7 errors detected!
[error] firrtl.passes.PassExceptions: 
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 103:20]: [module ICache]  Expression ctrl.io.ctrlrepl is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 106:20]: [module ICache]  Expression ctrl.io.ocp_port is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 106:20]: [module ICache]  Expression io.ocp_port is used as a SourceFlow but can only be used as a SinkFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 107:16]: [module ICache]  Expression ctrl.io.perf is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 111:20]: [module ICache]  Expression repl.io.icachefe is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 112:20]: [module ICache]  Expression repl.io.replctrl is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.CheckFlows$WrongFlow:  @[ICache.scala 114:17]: [module ICache]  Expression repl.io.memIn is used as a SinkFlow but can only be used as a SourceFlow.
[error] firrtl.passes.PassException: 7 errors detected!
[error] Nonzero exit code: 1
[error] (Compile / runMain) Nonzero exit code: 1
[error] Total time: 8 s, completed Dec 22, 2021 3:46:38 PM
@schoeberl
Copy link
Member

Thanks for pointing this out. This is bad. I guess this is something that has never been tested at the port from Chisel 2 to Chisel 3.

@schoeberl
Copy link
Member

Any chance that you could look into it and fix it?

@michael-platzer
Copy link
Contributor Author

Any chance that you could look into it and fix it?

Sorry, I won't be able to look into this anytime soon.

@michael-platzer michael-platzer removed their assignment Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants