ship: Shift == Ports =========================================================== data in: in data in: inShift data out: out == Constants ======================================================== == TeX ============================================================== To Do: - deal with sign-extension - rotate (in addition to shift)? - rotate, shift, and sign-extend subfields of a word? - scan for lowest/highest bit which is set/clear? - bitfields crossing two words == Fleeterpreter ==================================================== public void service() { if (box_in.dataReadyForShip() && box_inShift.dataReadyForShip()) { int val = box_in.removeDataForShip(); int inShift = box_inShift.removeDataForShip(); if (inShift < 0) val = val >> (-1 * inShift); else val = val << inShift; box_out.addDataFromShip(val); } } == FleetSim ============================================================== == FPGA ============================================================== // not implemented FIXME! == Contributors ========================================================= Adam Megacz