import py4hw
import wavedrom as wd
hw = py4hw.HWSystem()
a = hw.wire('a', 8)
b = hw.wire('b', 8)
a_ls = hw.wires('a_ls_bits', 8, 1)
a_ms = hw.wires('a_ms_bits', 8, 1)
py4hw.Sequence(hw, 'a', [1, 2, 8, 0x0F, 0xF0, 0x80, 0x70, 0x30, 0x10], a)
py4hw.BitsLSBF(hw, 'lsbf', a, a_ls)
py4hw.BitsMSBF(hw, 'msbf', a, a_ms)
py4hw.ConcatenateMSBF(hw, 'con', a_ls, b)
watch = [a]
watch.extend(a_ls)
watch.extend(a_ms)
watch.append(b)
wvf = py4hw.Waveform(hw, 'wvf', watch)
hw.getSimulator().clk(20)
wd.render(str(wvf.get_wavedrom(shortNames=True)))