| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- `timescale 1ns/1ps
- module project_adapter #(
- parameter integer PTC_COUNT = 8,
- parameter integer FAN_COUNT = 4,
- parameter integer CHAMBER_PTC_COUNT = 4,
- parameter integer SET_ALL_PAYLOAD_LENGTH = 11,
- parameter integer FAN_OFFSET = 0,
- parameter integer CHAMBER_PTC_OFFSET = 4,
- parameter integer Z_DOOR_OFFSET = 8,
- parameter integer EXHAUST_X_OFFSET = 9,
- parameter integer EXHAUST_Y_OFFSET = 10,
- parameter integer OPEN_DIR = 0,
- parameter integer CLOSE_DIR = 1,
- parameter integer AXIS_COUNT = 3
- ) (
- input wire clk,
- input wire rst_n,
- input wire frame_valid,
- output wire frame_ready,
- output wire frame_accept_enable,
- input wire [7:0] frame_type,
- input wire [7:0] frame_length,
- output wire [7:0] payload_read_addr,
- input wire [7:0] payload_read_data,
- output wire target_wr_en,
- output wire [3:0] target_wr_addr,
- output wire [7:0] target_wr_data,
- output wire valid_set_all_commit,
- output wire motor_start,
- output wire [AXIS_COUNT-1:0] motor_active_mask,
- output wire [AXIS_COUNT-1:0] motor_dir_mask,
- input wire motor_busy,
- input wire watchdog_abort,
- output wire temperature_start,
- input wire temperature_done,
- output wire tx_start,
- input wire tx_done,
- output wire busy
- );
- wire [1:0] z_door_cmd;
- wire [1:0] exhaust_x_cmd;
- wire [1:0] exhaust_y_cmd;
- wire door_action_valid;
- command_controller #(
- .PTC_COUNT(PTC_COUNT),
- .FAN_COUNT(FAN_COUNT),
- .CHAMBER_PTC_COUNT(CHAMBER_PTC_COUNT),
- .SET_ALL_PAYLOAD_LENGTH(SET_ALL_PAYLOAD_LENGTH),
- .FAN_OFFSET(FAN_OFFSET),
- .CHAMBER_PTC_OFFSET(CHAMBER_PTC_OFFSET),
- .Z_DOOR_OFFSET(Z_DOOR_OFFSET),
- .EXHAUST_X_OFFSET(EXHAUST_X_OFFSET),
- .EXHAUST_Y_OFFSET(EXHAUST_Y_OFFSET)
- ) controller (
- .clk(clk), .rst_n(rst_n),
- .frame_valid(frame_valid), .frame_ready(frame_ready),
- .frame_accept_enable(frame_accept_enable),
- .frame_type(frame_type), .frame_length(frame_length),
- .payload_read_addr(payload_read_addr), .payload_read_data(payload_read_data),
- .target_wr_en(target_wr_en), .target_wr_addr(target_wr_addr),
- .target_wr_data(target_wr_data),
- .valid_set_all_commit(valid_set_all_commit),
- .z_door_cmd(z_door_cmd),
- .exhaust_x_cmd(exhaust_x_cmd),
- .exhaust_y_cmd(exhaust_y_cmd),
- .door_action_valid(door_action_valid),
- .temperature_start(temperature_start), .temperature_done(temperature_done),
- .tx_start(tx_start), .tx_done(tx_done), .busy(busy)
- );
- door_action_dispatcher #(
- .OPEN_DIR(OPEN_DIR),
- .CLOSE_DIR(CLOSE_DIR),
- .AXIS_COUNT(AXIS_COUNT)
- ) u_door_dispatch (
- .clk(clk), .rst_n(rst_n),
- .door_action_valid(door_action_valid),
- .z_door_cmd(z_door_cmd),
- .exhaust_x_cmd(exhaust_x_cmd),
- .exhaust_y_cmd(exhaust_y_cmd),
- .watchdog_abort(watchdog_abort),
- .motor_start(motor_start),
- .motor_active_mask(motor_active_mask),
- .motor_dir_mask(motor_dir_mask),
- .motor_busy(motor_busy)
- );
- endmodule
|