data/full_repos/permissive/13953309/NW_route.v
 line:37: before: "function"
1: b'%Error: data/full_repos/permissive/13953309/NW_route.v:42: Cannot find include file: parameters.v\n   `include "parameters.v"\n            ^~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/13953309,data/full_repos/permissive/13953309/parameters.v\n             data/full_repos/permissive/13953309,data/full_repos/permissive/13953309/parameters.v.v\n             data/full_repos/permissive/13953309,data/full_repos/permissive/13953309/parameters.v.sv\n             parameters.v\n             parameters.v.v\n             parameters.v.sv\n             obj_dir/parameters.v\n             obj_dir/parameters.v.v\n             obj_dir/parameters.v.sv\n%Error: data/full_repos/permissive/13953309/NW_route.v:50: Define or directive not defined: \'`TILE\'\n      if (port==`TILE) begin\n                ^~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:50: syntax error, unexpected \')\', expecting TYPE-IDENTIFIER\n      if (port==`TILE) begin\n                     ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:55: syntax error, unexpected end\n   end\n   ^~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:82: syntax error, unexpected IDENTIFIER, expecting \';\'\n   input flit_t flit_in;\n                ^~~~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:83: syntax error, unexpected IDENTIFIER, expecting \';\'\n   output flit_t flit_out;\n                 ^~~~~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:87: syntax error, unexpected IDENTIFIER, expecting \'(\' or \';\'\n   function flit_t next_route;\n                   ^~~~~~~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:89: syntax error, unexpected IDENTIFIER, expecting \';\'\n   input flit_t flit_in;\n                ^~~~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:94: syntax error, unexpected begin\n      begin\n      ^~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:102: syntax error, unexpected \'=\', expecting IDENTIFIER\n        route = `port5id_east;\n              ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:102: Define or directive not defined: \'`port5id_east\'\n        route = `port5id_east;\n                ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:103: syntax error, unexpected \'.\', expecting IDENTIFIER\n        new_flit.control.x_disp--;\n                        ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:105: syntax error, unexpected \'=\', expecting IDENTIFIER\n        route = `port5id_west;\n              ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:105: Define or directive not defined: \'`port5id_west\'\n        route = `port5id_west;\n                ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:106: syntax error, unexpected \'.\', expecting IDENTIFIER\n        new_flit.control.x_disp++;\n                        ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:110: syntax error, unexpected \'=\', expecting IDENTIFIER\n        route=`port5id_tile;\n             ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:110: Define or directive not defined: \'`port5id_tile\'\n        route=`port5id_tile;\n              ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:112: syntax error, unexpected \'=\', expecting IDENTIFIER\n        route=`port5id_south;\n             ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:112: Define or directive not defined: \'`port5id_south\'\n        route=`port5id_south;\n              ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:113: syntax error, unexpected \'.\', expecting IDENTIFIER\n        new_flit.control.y_disp--;\n                        ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:115: syntax error, unexpected \'=\', expecting IDENTIFIER\n        route=`port5id_north;\n             ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:115: Define or directive not defined: \'`port5id_north\'\n        route=`port5id_north;\n              ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/13953309/NW_route.v:116: syntax error, unexpected \'.\', expecting IDENTIFIER\n        new_flit.control.y_disp++;\n                        ^\n%Error: data/full_repos/permissive/13953309/NW_route.v:120: syntax error, unexpected \'.\', expecting IDENTIFIER\n  new_flit.control.output_port = route;\n                  ^\n%Error: Internal Error: data/full_repos/permissive/13953309/NW_route.v:80: ../V3ParseSym.h:114: Symbols suggest ending FUNC \'flit_t\' but parser thinks ending MODULE \'NW_route\'\nmodule NW_route (flit_in, flit_out, clk, rst_n);\n       ^~~~~~~~\n'
function flit_t next_route;

	  input flit_t flit_in;
	  
      logic [4:0] route;
      flit_t new_flit;

      begin

	 new_flit=flit_in;



	 if (flit_in.control.x_disp!=0) begin
	    if (flit_in.control.x_disp>0) begin
	       route = `port5id_east;
	       new_flit.control.x_disp--;
	    end else begin
	       route = `port5id_west;
	       new_flit.control.x_disp++;
	    end
	 end else begin
	    if (flit_in.control.y_disp==0) begin
	       route=`port5id_tile;
	    end else if (flit_in.control.y_disp>0) begin
	       route=`port5id_south;
	       new_flit.control.y_disp--;
	    end else begin
	       route=`port5id_north;
	       new_flit.control.y_disp++;
	    end
	 end

	 new_flit.control.output_port = route;
	 
	 next_route = new_flit;

      end
   endfunction
function flit_t next_route;


	  input flit_t flit_in;
	  
      logic [4:0] route;
      flit_t new_flit;

      begin

	 new_flit=flit_in;



	 if (flit_in.control.x_disp!=0) begin
	    if (flit_in.control.x_disp>0) begin
	       route = `port5id_east;
	       new_flit.control.x_disp--;
	    end else begin
	       route = `port5id_west;
	       new_flit.control.x_disp++;
	    end
	 end else begin
	    if (flit_in.control.y_disp==0) begin
	       route=`port5id_tile;
	    end else if (flit_in.control.y_disp>0) begin
	       route=`port5id_south;
	       new_flit.control.y_disp--;
	    end else begin
	       route=`port5id_north;
	       new_flit.control.y_disp++;
	    end
	 end

	 new_flit.control.output_port = route;
	 
	 next_route = new_flit;

      end
   endfunction