ad_sysref_gen: Fix sysref generation

Toggle sysref output just if the sysref_en is asserted.
main
Istvan Csomortani 2016-12-19 18:02:49 +02:00
parent 180c96bcde
commit ce47cf8d30
1 changed files with 4 additions and 2 deletions

View File

@ -77,8 +77,10 @@ module ad_sysref_gen (
// generate SYSREF
always @(posedge core_clk) begin
if (counter == SYSREF_HALFPERIOD) begin
sysref_out <= ~sysref_out;
if (sysref_en_int) begin
if (counter == SYSREF_HALFPERIOD) begin
sysref_out <= ~sysref_out;
end
end else begin
sysref_out <= 1'b0;
end