Chisel versions

101 views
Skip to first unread message

Martin Schoeberl

unread,
Feb 19, 2013, 9:33:04 PM2/19/13
to chisel...@googlegroups.com
Hi all,

which version of Chisel is the latest and creates to be used?

In the tutorial build.scala I see version 1.0, from a colleague I got the hint that there is a 1.0.7 version. Tried both and get different error messages on my design ;-)

Then there is the source repository on GitHub and a message of the second public release. Is this public release also represented as sbt downloadable library?

A side note: how does this 'magic' work?
"edu.berkeley.cs" %% "chisel" % "1.0.7"

Are there class files hosted on cs.berkeley.edu? Or on a designated SBT host?

Sorry for that many questions. I'm still fighting to get some first reasonable chisel code compile and run.

Cheers,
Martin

PS: is it ok to post beginner Chisel questions here in this group?

Jonathan Bachrach

unread,
Feb 20, 2013, 2:23:28 AM2/20/13
to chisel...@googlegroups.com
On Feb 19, 2013, at 6:33 PM, Martin Schoeberl <mar...@jopdesign.com> wrote:

> Hi all,
>
> which version of Chisel is the latest and creates to be used?

i think we're at 1.0.8 right now.

> In the tutorial build.scala I see version 1.0, from a colleague I got the hint that there is a 1.0.7 version. Tried both and get different error messages on my design ;-)
>
> Then there is the source repository on GitHub and a message of the second public release. Is this public release also represented as sbt downloadable library?

yes 1.0.8.

> A side note: how does this 'magic' work?
> "edu.berkeley.cs" %% "chisel" % "1.0.7"

i'm not sure the exact magic but it is documented in sbt docs.
looks like you can use 1.0.+ instead to the most recent 1.0 version

> Are there class files hosted on cs.berkeley.edu? Or on a designated SBT host?

it's on a sonatype server

> Sorry for that many questions. I'm still fighting to get some first reasonable chisel code compile and run.

good luck.

> Cheers,
> Martin
>
> PS: is it ok to post beginner Chisel questions here in this group?

sure.

> --
> You received this message because you are subscribed to the Google Groups "chisel-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to chisel-users...@googlegroups.com.
> To post to this group, send email to chisel...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Martin Schoeberl

unread,
Feb 20, 2013, 3:04:58 AM2/20/13
to chisel...@googlegroups.com

On 19 Feb, 2013, at 23:23, Jonathan Bachrach wrote:

> On Feb 19, 2013, at 6:33 PM, Martin Schoeberl <mar...@jopdesign.com> wrote:
>
>> Hi all,
>>
>> which version of Chisel is the latest and creates to be used?
>
> i think we're at 1.0.8 right now.

Changed Build.scala to 1.0.8 and everything compiles well.

Thanks for the late night reply :-)

>> Are there class files hosted on cs.berkeley.edu? Or on a designated SBT host?
>
> it's on a sonatype server

Huh, I've never heard about that one. Looks like I'm missing some stuff. However, when I
look at their web site, I don't get an idea what this is all about.

>> PS: is it ok to post beginner Chisel questions here in this group?
>
> sure.

Ok, this gives me a free ride ;-)

I'm having troubles to connect two components (pipeline stages). My current example is really trivial, but I'm lost. I don't get the values across, or with changes I get Java runtime exceptions, or even C++ compile errors.

Here is my example, for which I'm asking for help:

I would like to use a Bundle for output form one component to the input to the next component. And as a further step (not really explored so far) I would also like to use that Bundle for a register.

The Bundles are declared without INPUT or OUTPUT, but I'm using later on asInput and asOutput:
https://github.com/t-crest/patmos/blob/master/chisel/src/patmos/Ports.scala

The first stage (Fetch.scala) works so far:
https://github.com/t-crest/patmos/blob/master/chisel/src/patmos/Fetch.scala

The two stages are connected in the main component Patmos:
https://github.com/t-crest/patmos/blob/master/chisel/src/patmos/Patmos.scala

That's where the troubles start. the bulk connector <> compiles. Using something like
decode.io.in := fetch.io.out,
which should be ok in my opinion, results in a java.lang.NullPointerException

Ok, with the bulk connection, the value of pc is never put forward to the Decode component.
The debug output of the pc in Decode is constant 10, which is added for tests to the pc input in Decode:
https://github.com/t-crest/patmos/blob/master/chisel/src/patmos/Decode.scala

Maybe you are able to spot the issue with a quick look. Or I can try to simplify this example down to a single file.

Thanks,
Martin

Jonathan Bachrach

unread,
Feb 20, 2013, 2:25:36 PM2/20/13
to chisel...@googlegroups.com
i put your files into one file and didn't have any trouble compiling it with the chisel C++ backend. i'm really not sure why you are having trouble.

run patmos-test
run patmos-test
[info] Compiling 1 Scala source to /Users/jrb/Documents/bar/flo/sbt/flo/target/scala-2.10.0/classes...
[info] Running Flo.Main patmos-test
PATMOS TEST
// COMPILING Patmos(1)
started inference
7
finished inference
start width checking
finished width checking
started flattenning
52
finished flattening
resolving nodes to the components
finished resolving
BEGINNING COMBINATIONAL LOOP CHECKING
BEGINNING SEARCHING CIRCUIT FOR COMBINATIONAL LOOP
FINISHED ANALYZING CIRCUIT
NO COMBINATIONAL LOOP FOUND
total: 54
name: count %
Extract: 9 40.91
Mux: 3 13.64
Reg: 3 13.64
+: 2 9.09
|: 2 9.09
~: 1 4.55
##: 1 4.55
&: 1 4.55
w: count %
8: 9 40.91
10: 4 18.18
1: 4 18.18
33: 3 13.64
7: 1 4.55
32: 1 4.55
f: count %
1: 20 90.91
3: 1 4.55
5: 1 4.55
NUM 22 MAX-WIDTH 5 MAX-DEPTH 8
g++ -c -o ../emulator/Patmos-emulator.o -O2 -I../ -I/Users/jrb/Documents/bar/chisel/csrc/ ../emulator/Patmos-emulator.cpp RET 0
g++ -c -o ../emulator/Patmos.o -O2 -I../ -I/Users/jrb/Documents/bar/chisel/csrc/ ../emulator/Patmos.cpp RET 0
g++ -o ../emulator/Patmos ../emulator/Patmos.o ../emulator/Patmos-emulator.o RET 0
STARTING ../emulator/Patmos
---
INPUTS
INPUT(instr_a) = 0
INPUT(Patmos__pc.Patmos) = 0
OUTPUTS
READ OUTPUT(Patmos__io_led.Patmos) = 254[0xfe] ( Flo.Patmos$$anon$1.<init>(patmos.scala:82) )
READ OUTPUT(Patmos_fetch__io_out_instr_a.Fetch) = 131327[0x000200ff] ( Flo.FetchOut.<init>(patmos.scala:18) )
READ OUTPUT(Patmos_fetch__io_out_pc.Fetch) = 0[0x000] ( Flo.FetchOut.<init>(patmos.scala:21) )
READ OUTPUT(Patmos__pc.Patmos) = 10[0x00a] ( Flo.DecodeOut.<init>(patmos.scala:31) )
led/litVal 254
pc: 0
pc decode: 10
---
INPUTS
INPUT(instr_a) = 0
INPUT(Patmos__pc.Patmos) = 0
OUTPUTS
READ OUTPUT(Patmos__io_led.Patmos) = 253[0xfd] ( Flo.Patmos$$anon$1.<init>(patmos.scala:82) )
READ OUTPUT(Patmos_fetch__io_out_instr_a.Fetch) = 262145[0x00040001] ( Flo.FetchOut.<init>(patmos.scala:18) )
READ OUTPUT(Patmos_fetch__io_out_pc.Fetch) = 1[0x001] ( Flo.FetchOut.<init>(patmos.scala:21) )
READ OUTPUT(Patmos__pc.Patmos) = 10[0x00a] ( Flo.DecodeOut.<init>(patmos.scala:31) )
led/litVal 253
pc: 1
pc decode: 10
---
INPUTS
INPUT(instr_a) = 0
INPUT(Patmos__pc.Patmos) = 0
OUTPUTS
READ OUTPUT(Patmos__io_led.Patmos) = 251[0xfb] ( Flo.Patmos$$anon$1.<init>(patmos.scala:82) )
READ OUTPUT(Patmos_fetch__io_out_instr_a.Fetch) = 393218[0x00060002] ( Flo.FetchOut.<init>(patmos.scala:18) )
READ OUTPUT(Patmos_fetch__io_out_pc.Fetch) = 2[0x002] ( Flo.FetchOut.<init>(patmos.scala:21) )
READ OUTPUT(Patmos__pc.Patmos) = 10[0x00a] ( Flo.DecodeOut.<init>(patmos.scala:31) )
led/litVal 251
pc: 2
pc decode: 10
---
INPUTS
INPUT(instr_a) = 0
INPUT(Patmos__pc.Patmos) = 0
OUTPUTS
READ OUTPUT(Patmos__io_led.Patmos) = 247[0xf7] ( Flo.Patmos$$anon$1.<init>(patmos.scala:82) )
READ OUTPUT(Patmos_fetch__io_out_instr_a.Fetch) = 34087296[0x02082180] ( Flo.FetchOut.<init>(patmos.scala:18) )
READ OUTPUT(Patmos_fetch__io_out_pc.Fetch) = 3[0x003] ( Flo.FetchOut.<init>(patmos.scala:21) )
READ OUTPUT(Patmos__pc.Patmos) = 10[0x00a] ( Flo.DecodeOut.<init>(patmos.scala:31) )
led/litVal 247
pc: 3
pc decode: 10
PASSED
[success] Total time: 2 s, completed Feb 20, 2013 11:23:25 AM

Martin Schoeberl

unread,
Feb 20, 2013, 2:59:01 PM2/20/13
to chisel...@googlegroups.com
Your output looks quite different to mine, however I see the same issue on it.
Probably I'm still using a different version of Chisel than you.

The code example I referred to does compile. However, it does not work
as expected. And that I can see in your output as well. The pc value from
Fetch is not 'used' in Decode. There it stays at 10. In your run and in my run.

I get compile errors when changing 'decode.io.in <> fetch.io.out' to
'decode.io.in := fetch.io.out'

Cheers,
Martin

Martin Schoeberl

unread,
Feb 20, 2013, 5:24:54 PM2/20/13
to chisel...@googlegroups.com
Got some help to fix the issue. My fault: I had missing the extends Component on Decode. That resulted in this strange behavior. So the bulk assignment works for me, and i learned that := assignment only works with base types and not with Bundels.

Cheers,
Martin
Reply all
Reply to author
Forward
0 new messages