//--------------------------------------------------------------------------------------------------
//
// Title       : Shifter
// Design      : encoder
// Author      : mbari###
// Company     : MBARI
//
//-------------------------------------------------------------------------------------------------
//
// File        : c:\Projects\genosensor\2g\CPLDs\Rvavle\encoder\encoder\src\Shifter.v
// Generated   : Mon Mar 22 08:37:26 2004
// From        : interface description file
// By          : Itf2Vhdl ver. 1.20
//
//-------------------------------------------------------------------------------------------------
//
// Description : 
//
//-------------------------------------------------------------------------------------------------


//{{ Section below this comment is automatically maintained
//   and may be overwritten
//{module {Shifter}}
module Shifter ( Pdata ,RVALVEHIGHr ,data ,clk ,reset ,RVALVELOWr ,shift );

input RVALVEHIGHr ;
wire RVALVEHIGHr ;
input data ;
wire data ;
input clk ;
wire clk ;
input reset ;
wire reset ;
input RVALVELOWr ;
wire RVALVELOWr ;
input shift ;
wire shift ;

output [7:0] Pdata ;
wire [7:0] Pdata ;

//}} End of automatically maintained section

// -- Enter your statements here -- //

reg [8:0] Pdatar;

assign Pdata = (RVALVEHIGHr) ? {7'b0,Pdatar[8]} : 
				(RVALVELOWr) ? Pdatar[7:0] : 8'bz;

always @(posedge clk)
	begin
		if (reset) Pdatar <= 9'b0;
		else
			begin
				if (shift) Pdatar[8:0] <= {Pdatar[7:0],data};
				else Pdatar <= Pdatar;
			end
	end
endmodule
