-
Notifications
You must be signed in to change notification settings - Fork 0
/
WindowShadeDegree.v
39 lines (37 loc) · 1.23 KB
/
WindowShadeDegree.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*-- *******************************************************
-- Computer Architecture Course, Laboratory Sources
-- Amirkabir University of Technology (Tehran Polytechnic)
-- Department of Computer Engineering (CE-AUT)
-- https://ce[dot]aut[dot]ac[dot]ir
-- *******************************************************
-- All Rights reserved (C) 2019-2020
-- *******************************************************
-- Student ID :
-- Student Name:
-- Student Mail:
-- *******************************************************
-- Additional Comments:
--
--*/
/*-----------------------------------------------------------
--- Module Name: Window Shade Degree
--- Description: Module4:
-----------------------------------------------------------*/
`timescale 1 ns/1 ns
module WindowShadeDegree (
input [3:0] tcode , // time code [table2 time code ]
input [3:0] ulight , // user light [light degree mode ]
output reg [3:0] wshade // shade level [window shade level ]
);
always @(tcode or ulight)
begin
case(tcode)
4'b0001 : wshade = 4'b1111;
4'b0010 : wshade = 4'b1100;
4'b0100 : wshade = ulight ;
4'b1000 : wshade = 4'b0 ;
4'B0000 : wshade = 4'b0 ;
default: wshade = 4'b0 ;
endcase
end
endmodule