-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathProcessor.v
47 lines (39 loc) · 1.33 KB
/
Processor.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
40
41
42
43
44
45
46
47
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 21.03.2024 20:26:00
// Design Name:
// Module Name: Processor
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module Processor(clk,reset,instruction,x_out,y_out);
input clk,reset;
input [35:0] instruction;
output signed [8:0]x_out;
output signed [7:0]y_out;
parameter ALU_LD=3'b100,
ALU_RD=3'b101,
ALU_CD=3'b110,
ALU_DISP=3'b111;
wire draw;
wire [2:0] ctrl_ALU;
wire signed [8:0]x1,x2;
wire signed [7:0]y1,y2;
wire done;
//comment out line_draw if you are using circle_draw and vice versa
Instruction_decoder ins(.instruction(instruction),.reset(reset),.done_in(done),.ctrl_ALU(ctrl_ALU),.x1(x1),.x2(x2),.y1(y1),.y2(y2),.done_out(done));
//Line_Draw line(.clk(clk),.reset(reset),.x1(x1),.y1(y1),.x2(x2),.y2(y2),.done_in(done),.ctrl_ALU(ctrl_ALU),.x_out(x_out),.y_out(y_out),.done_out(done));
Circle_Draw_1 circle(.clk(clk),.reset(reset),.xc(x1),.yc(y1),.r(x2),.done_in(done),.ctrl_ALU(ctrl_ALU),.x_out(x_out),.y_out(y_out),.done_out(done));
endmodule