//--------------------------------------------------------------------------------------------------
//
// 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 ,Reset ,RVALVELOWr ,shift ,Mclk );

input RVALVEHIGHr ;
wire RVALVEHIGHr ;
input data ;
wire data ;
input Reset ;
wire Reset ;
input RVALVELOWr ;
wire RVALVELOWr ;
input shift ;
wire shift ;
input Mclk ;
wire Mclk ;

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 Mclk)
	begin
		if (Reset) Pdatar <= 9'b0;
		else
			begin
				if (shift) Pdatar[8:0] <= {Pdatar[7:0],data};
				else Pdatar <= Pdatar;
			end
	end
endmodule
