ucb-bar/chisel — pull request #221 by zhemao (2014-05-26 18:09:58+00:00)
Title: Add Repeat object to standard library

I've several times wanted to express a "repeat" pattern in chisel, in which a single signal is duplicated N times and concatenated together. This would be equivalent to `{N {sig}}` in Verilog or `(N-1 downto 0) => sig` in VHDL. There are several ways to do this in Chisel using Scala meta-programming, but I think it would be useful to simply add it to the standard library. That way, you could do something like

Repeat(UInt(1, 1), 8)

And get a byte with all the bits initialized to 1.