//--------------------------------------------------------------------------------------------------
//
// Title       : Sensor
// Design      : U21
// Author      : SJensen
// Company     : MBARI
//
//-------------------------------------------------------------------------------------------------
//
// File        : c:\Projects\genosensor\2g\CPLDs\Core\U21\src\Sensor.v
// Generated   : Wed Apr 28 08:19:05 2004
// From        : interface description file
// By          : Itf2Vhdl ver. 1.20
//
//-------------------------------------------------------------------------------------------------
//
// Description : 
//
//-------------------------------------------------------------------------------------------------
`timescale 1ns / 1ns

//{{ Section below this comment is automatically maintained
//   and may be overwritten
//{module {Sensor}}
module Sensor ( PresSlct ,inDATA ,Reset ,TmpEn ,TmpSlct ,Mclk ,DCORSENSORw ,PresEn );

input DCORSENSORw ;
wire DCORSENSORw ;
input [7:0] inDATA ;
wire [7:0] inDATA ;
input Reset ;
wire Reset ;
input Mclk ;
wire Mclk ;

output PresSlct ;
wire PresSlct ;
output TmpEn ;
wire TmpEn ;
output PresEn ;
wire PresEn ;
output TmpSlct ;
wire TmpSlct ;

//}} End of automatically maintained section

// -- Enter your statements here -- //

reg [3:0] sensorr;

assign PresEn = !sensorr[0];
assign PresSlct = sensorr[1];
assign TmpEn = !sensorr[2];
assign TmpSlct = sensorr[3];  

always @ (negedge Mclk or posedge Reset)
	begin  
	  if (Reset) sensorr <= 4'b0;  //define async reset to turn off temperature and pressure
      else if (DCORSENSORw) sensorr <= inDATA[3:0];
	end
endmodule
