The most important part of this task is keeping track of which row and column should be
accessed in each matrix.

In short, there are three values you need to have control over:
Column select, Row select A and Row select B

Further, it is useful to separate input phase and calculation phase.

In the input phase Row select A should be the same as Row select B since
you're simply inputting values.
For a 3x2 matrix you want to first input the first vector (that is, row 0),
so for cycle 0, 1 and 2 rowSelect should be 0, whereas column select should be
the same as the (cycle % columns)

After Inputting data all three values should be reset to 0.
This is a fairly typical task, so chisel.util has you covered with the Counter class
https://chisel.eecs.berkeley.edu/api/3.0.1/chisel3/util/Counter.html
https://chisel.eecs.berkeley.edu/api/3.0.1/chisel3/util/Counter$.html

The second link links to the Counter object rather than the class. Typically we put
constructors and static methods in the companion object of a class.
Object methods named apply can be called directly from the object, which means
~MyObject.apply(123)~ is the same as ~MyObject(123)~
Very convenient once you're used to it, but a little odd first time you see it.

In the Counter object there is an apply method:
#+begin_src scala
  def apply(cond: Bool, n: Int): (UInt, Bool)
#+end_src

From the signature we see (well, I see because I happen to know that scala bools are called Boolean)
that the input is a chisel.data.Bool and a scala Int, and the output is a tuple of 
chisel.data.UInt and chisel.data.Bool

The return values for the call to Counter.apply is a wire containing the current value of the counter, 
and a wire that is toggled whenever the clock rolls over.

The arguments are a scala int, specifying how many ticks it takes for the clock to roll over, and a
wire whose signal toggles the clock on or off.

In our matrix multiplier this is pretty handy:

#+begin_src scala
val (colCounter, colCounterWrap) = Counter(true.B, colDimsA)
val (rowSelA, rowSelAWrap)       = Counter(colCounterWrap, ???)
#+end_src

Here we have defined two counters. The column counter always ticks, wrapping around when it reaches colDimsA.
When the column counter wraps, the colCounterWrap wire is toggled, and the rowSelect clock makes a single tick.

If you can get row select A, B and col select to work in both phases you're very close to done, so these
should be your priority.
To test them, write your own test for MatMul that simply runs your MatMul unit and peeks at these values each
timestep until you're confident that they're correct.
As described in the debugging section, you should make a separate debug IO port with debug signals enabling you
to read out these values. Attempting to read them directly will throw an error.

The best tip of course is to actually show up during lab hours.
