Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model for DFF with enable input is generated with combinational port relation #25

Open
mglb opened this issue Dec 17, 2019 · 0 comments

Comments

@mglb
Copy link
Contributor

mglb commented Dec 17, 2019

Input file (ff.sim.v):

(* whitebox *)
module FF(clk, D, E, Q);
	input wire clk;
	(* SETUP="clk 10e-12" *)
	input wire D;
	(* SETUP="clk 10e-12" *)
	input wire E;
	(* CLK_TO_Q = "clk 10e-12" *)
	output reg Q;
	always @(posedge clk) begin
		if (E)
			Q <= D;
	end
endmodule

Generated model (ff.model.xml):

<models xmlns:xi="http://www.w3.org/2001/XInclude">
  <model name="FF">
    <input_ports>
      <port name="D" combinational_sink_ports="Q" clock="clk"/>
      <port name="E" combinational_sink_ports="Q" clock="clk"/>
      <port name="clk" is_clock="1"/>
    </input_ports>
    <output_ports>
      <port name="Q" clock="clk"/>
    </output_ports>
  </model>
</models>

The ports are not connected combinationally, so combinational_sink_ports shouldn't be there. Expected model:

<models xmlns:xi="http://www.w3.org/2001/XInclude">
  <model name="FF">
    <input_ports>
      <port name="D" clock="clk"/>
      <port name="E" clock="clk"/>
      <port name="clk" is_clock="1"/>
    </input_ports>
    <output_ports>
      <port name="Q" clock="clk"/>
    </output_ports>
  </model>
</models>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant