chisel-bootcamp icon indicating copy to clipboard operation
chisel-bootcamp copied to clipboard

2.3_control_flow.ipynb: thrid polynomial circuit exercise solution does not work

Open dsw opened this issue 5 years ago • 1 comments

On page 2.3_control_flow.ipynb, in the thrid polynomial circuit exercise, if I paste in the solution, it does not compile. Below is the message.

cmd2.sc:11: value \* is not a member of chisel3.SInt
    square := io.x \* io.x
                   ^cmd2.sc:13: value \* is not a member of chisel3.SInt
        result := (square - (2.S \* io.x)) + 1.S
                                 ^cmd2.sc:15: value \* is not a member of chisel3.SInt
        result := (2.S \* square) + (6.S \* io.x) + 3.S
                       ^cmd2.sc:15: value \* is not a member of chisel3.SInt
        result := (2.S \* square) + (6.S \* io.x) + 3.S
                                         ^cmd2.sc:17: value \* is not a member of chisel3.SInt
        result := (4.S \* square) - (10.S \* io.x) - 5.S
                       ^cmd2.sc:17: value \* is not a member of chisel3.SInt
        result := (4.S \* square) - (10.S \* io.x) - 5.S
                                          ^cmd2.sc:29: not found: value poly
      expect(c.io.fOfX, poly(select, x))
                        ^Compilation Failed

dsw avatar Nov 27 '19 05:11 dsw

update: it seems that backslash star is not a Chisel operator. So the bug is that the solutions have backslashes before the start (multiply) operators.

dsw avatar Nov 27 '19 05:11 dsw