data/full_repos/permissive/469395973/hdl/twowire_dtm.v
1: b"%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:27: syntax error, unexpected ')', expecting '['\n) (\n^\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:30: syntax error, unexpected input, expecting IDENTIFIER or do or final\n input  wire                     drst_n,\n ^~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:33: syntax error, unexpected output, expecting IDENTIFIER or do or final\n output wire                     do,\n ^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:33: Unexpected 'do': 'do' is a SystemVerilog keyword misused as an identifier.\n        ... Suggest modify the Verilog-2001 code to avoid SV keywords, or use `begin_keywords or --language.\n output wire                     do,\n                                 ^~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:34: syntax error, unexpected output, expecting IDENTIFIER or do or final\n output wire                     doe,\n ^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:35: syntax error, unexpected input, expecting IDENTIFIER or do or final\n input  wire                     di,\n ^~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:38: syntax error, unexpected output, expecting IDENTIFIER or do or final\n output wire                     host_connected,\n ^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:41: syntax error, unexpected output, expecting IDENTIFIER or do or final\n output wire                     ndtmresetreq,\n ^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:42: syntax error, unexpected input, expecting IDENTIFIER or do or final\n input  wire                     ndtmresetack,\n ^~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:45: syntax error, unexpected input, expecting IDENTIFIER or do or final\n input  wire [N_AINFO-1:0]       ainfo_present,\n ^~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:48: syntax error, unexpected output, expecting IDENTIFIER or do or final\n output wire [W_ADDR-1:0]        dst_paddr,\n ^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:49: syntax error, unexpected output, expecting IDENTIFIER or do or final\n output wire                     dst_psel,\n ^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:50: syntax error, unexpected output, expecting IDENTIFIER or do or final\n output wire                     dst_penable,\n ^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:51: syntax error, unexpected output, expecting IDENTIFIER or do or final\n output wire                     dst_pwrite,\n ^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:52: syntax error, unexpected input, expecting IDENTIFIER or do or final\n input  wire                     dst_pready,\n ^~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:53: syntax error, unexpected input, expecting IDENTIFIER or do or final\n input  wire                     dst_pslverr,\n ^~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:54: syntax error, unexpected output, expecting IDENTIFIER or do or final\n output wire [31:0]              dst_pwdata,\n ^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:55: syntax error, unexpected input, expecting IDENTIFIER or do or final\n input  wire [31:0]              dst_prdata\n ^~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:56: syntax error, unexpected ')', expecting ',' or ';'\n);\n^\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:66: syntax error, unexpected IDENTIFIER\ntwowire_dtm_io_flops io_flops_u (\n^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:87: syntax error, unexpected IDENTIFIER\ntwowire_dtm_connect_monitor connect_monitor_u (\n^~~~~~~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:97: syntax error, unexpected assign\nassign host_connected = connected;\n^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:102: syntax error, unexpected always\nalways @ (posedge dck or negedge drst_n) begin\n^~~~~~\n%Error: data/full_repos/permissive/469395973/hdl/twowire_dtm.v:125: syntax error, unexpected IDENTIFIER\ntwowire_dtm_serial_comms #(\n^~~~~~~~~~~~~~~~~~~~~~~~\n%Error: Exiting due to 24 error(s)\n"
module twowire_dtm #(


	parameter IDCODE    = 32'h0,


	parameter ASIZE     = 0,


	parameter N_AINFO   = 1,

	parameter AINFO     = {N_AINFO{32'h0}},


	parameter W_ADDR    = 8 * (1 + ASIZE),
) (

	input  wire                     dck,
	input  wire                     drst_n,


	output wire                     do,
	output wire                     doe,
	input  wire                     di,


	output wire                     host_connected,


	output wire                     ndtmresetreq,
	input  wire                     ndtmresetack,


	input  wire [N_AINFO-1:0]       ainfo_present,


	output wire [W_ADDR-1:0]        dst_paddr,
	output wire                     dst_psel,
	output wire                     dst_penable,
	output wire                     dst_pwrite,
	input  wire                     dst_pready,
	input  wire                     dst_pslverr,
	output wire [31:0]              dst_pwdata,
	input  wire [31:0]              dst_prdata
);





wire do_nxt;
wire doe_nxt;
wire di_q;

twowire_dtm_io_flops io_flops_u (
	.dck    (dck),
	.drst_n (drst_n),

	.do     (do_nxt),
	.do_q   (do),

	.doe    (doe_nxt),
	.doe_q  (doe),

	.di     (di),
	.di_q   (di_q)
);




wire [3:0] mdropaddr;

wire connect_now;

twowire_dtm_connect_monitor connect_monitor_u (
	.dck         (dck),
	.drst_n      (drst_n),
	.di_q        (di_q),
	.mdropaddr   (mdropaddr),
	.connect_now (connect_now),
	.connected   (connected)
);

reg connected;
assign host_connected = connected;

wire disconnect_now;
wire sercom_parity_err;

always @ (posedge dck or negedge drst_n) begin
	if (!drst_n) begin
		connected <= 1'b0;
	end else begin
		connected <= (connected || connect_now) && !disconnect_now && !sercom_parity_err;
	end
end




localparam W_CMD = 4;

wire [W_CMD-1:0] sercom_cmd;
wire             sercom_cmd_vld;
wire             sercom_cmd_payload_end;

wire             sercom_wdata;
wire             sercom_wdata_vld;
wire             sercom_rdata;
wire             sercom_rdata_rdy;


twowire_dtm_serial_comms #(
	.W_CMD (W_CMD)
) sercom_u (
	.dck             (dck),
	.drst_n          (drst_n),

	.di_q            (di_q),
	.do_nxt          (do_nxt),
	.doe_nxt         (doe_nxt),

	.connected       (connected),

	.cmd             (sercom_cmd),
	.cmd_vld         (sercom_cmd_vld),
	.cmd_payload_end (sercom_cmd_payload_end),

	.parity_err      (sercom_parity_err),

	.wdata           (sercom_wdata),
	.wdata_vld       (sercom_wdata_vld),
	.rdata           (sercom_rdata),
	.rdata_rdy       (sercom_rdata_rdy)
);




twowire_dtm_core #(
	.W_CMD   (W_CMD),
	.ASIZE   (ASIZE),
	.IDCODE  (IDCODE),
	.N_AINFO (N_AINFO),
	.AINFO   (AINFO)
) core_u (
	.dck               (dck),
	.drst_n            (drst_n),

	.connected         (connected),
	.disconnect_now    (disconnect_now),
	.mdropaddr         (mdropaddr),

	.cmd               (sercom_cmd),
	.cmd_vld           (sercom_cmd_vld),
	.cmd_payload_end   (sercom_cmd_payload_end),

	.serial_parity_err (sercom_parity_err),
	.serial_wdata      (sercom_wdata),
	.serial_wdata_vld  (sercom_wdata_vld),
	.serial_rdata      (sercom_rdata),
	.serial_rdata_rdy  (sercom_rdata_rdy),

	.ndtmresetreq      (ndtmresetreq),
	.ndtmresetack      (ndtmresetack),

	.ainfo_present     (ainfo_present),

	.dst_paddr         (dst_paddr),
	.dst_psel          (dst_psel),
	.dst_penable       (dst_penable),
	.dst_pwrite        (dst_pwrite),
	.dst_pready        (dst_pready),
	.dst_pslverr       (dst_pslverr),
	.dst_pwdata        (dst_pwdata),
	.dst_prdata        (dst_prdata)
);

endmodule
module twowire_dtm #(


	parameter IDCODE    = 32'h0,


	parameter ASIZE     = 0,


	parameter N_AINFO   = 1,

	parameter AINFO     = {N_AINFO{32'h0}},


	parameter W_ADDR    = 8 * (1 + ASIZE),
) (

	input  wire                     dck,
	input  wire                     drst_n,


	output wire                     do,
	output wire                     doe,
	input  wire                     di,


	output wire                     host_connected,


	output wire                     ndtmresetreq,
	input  wire                     ndtmresetack,


	input  wire [N_AINFO-1:0]       ainfo_present,


	output wire [W_ADDR-1:0]        dst_paddr,
	output wire                     dst_psel,
	output wire                     dst_penable,
	output wire                     dst_pwrite,
	input  wire                     dst_pready,
	input  wire                     dst_pslverr,
	output wire [31:0]              dst_pwdata,
	input  wire [31:0]              dst_prdata
);






wire do_nxt;
wire doe_nxt;
wire di_q;

twowire_dtm_io_flops io_flops_u (
	.dck    (dck),
	.drst_n (drst_n),

	.do     (do_nxt),
	.do_q   (do),

	.doe    (doe_nxt),
	.doe_q  (doe),

	.di     (di),
	.di_q   (di_q)
);




wire [3:0] mdropaddr;

wire connect_now;

twowire_dtm_connect_monitor connect_monitor_u (
	.dck         (dck),
	.drst_n      (drst_n),
	.di_q        (di_q),
	.mdropaddr   (mdropaddr),
	.connect_now (connect_now),
	.connected   (connected)
);

reg connected;
assign host_connected = connected;

wire disconnect_now;
wire sercom_parity_err;

always @ (posedge dck or negedge drst_n) begin
	if (!drst_n) begin
		connected <= 1'b0;
	end else begin
		connected <= (connected || connect_now) && !disconnect_now && !sercom_parity_err;
	end
end




localparam W_CMD = 4;

wire [W_CMD-1:0] sercom_cmd;
wire             sercom_cmd_vld;
wire             sercom_cmd_payload_end;

wire             sercom_wdata;
wire             sercom_wdata_vld;
wire             sercom_rdata;
wire             sercom_rdata_rdy;


twowire_dtm_serial_comms #(
	.W_CMD (W_CMD)
) sercom_u (
	.dck             (dck),
	.drst_n          (drst_n),

	.di_q            (di_q),
	.do_nxt          (do_nxt),
	.doe_nxt         (doe_nxt),

	.connected       (connected),

	.cmd             (sercom_cmd),
	.cmd_vld         (sercom_cmd_vld),
	.cmd_payload_end (sercom_cmd_payload_end),

	.parity_err      (sercom_parity_err),

	.wdata           (sercom_wdata),
	.wdata_vld       (sercom_wdata_vld),
	.rdata           (sercom_rdata),
	.rdata_rdy       (sercom_rdata_rdy)
);




twowire_dtm_core #(
	.W_CMD   (W_CMD),
	.ASIZE   (ASIZE),
	.IDCODE  (IDCODE),
	.N_AINFO (N_AINFO),
	.AINFO   (AINFO)
) core_u (
	.dck               (dck),
	.drst_n            (drst_n),

	.connected         (connected),
	.disconnect_now    (disconnect_now),
	.mdropaddr         (mdropaddr),

	.cmd               (sercom_cmd),
	.cmd_vld           (sercom_cmd_vld),
	.cmd_payload_end   (sercom_cmd_payload_end),

	.serial_parity_err (sercom_parity_err),
	.serial_wdata      (sercom_wdata),
	.serial_wdata_vld  (sercom_wdata_vld),
	.serial_rdata      (sercom_rdata),
	.serial_rdata_rdy  (sercom_rdata_rdy),

	.ndtmresetreq      (ndtmresetreq),
	.ndtmresetack      (ndtmresetack),

	.ainfo_present     (ainfo_present),

	.dst_paddr         (dst_paddr),
	.dst_psel          (dst_psel),
	.dst_penable       (dst_penable),
	.dst_pwrite        (dst_pwrite),
	.dst_pready        (dst_pready),
	.dst_pslverr       (dst_pslverr),
	.dst_pwdata        (dst_pwdata),
	.dst_prdata        (dst_prdata)
);

endmodule