Skip to content

Commit

Permalink
quartus: fix retime in all the families
Browse files Browse the repository at this point in the history
  • Loading branch information
qarlosalberto committed Jun 11, 2024
1 parent 9461dc8 commit fe4fddf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,10 @@ export class QuartusProjectManager extends Project_manager {
this.taskStateManager.setCurrentTask(undefined);
const quartusDir = getQuartusPath(config);
const projectDir = get_directory(this.projectDiskPath);
const family = this.get_config().tools.quartus.family;

return runTask(taskType, this.taskStateManager, quartusDir, projectDir, this.get_name(), this.currentRevision,
this.emitterProject, callback);
family, this.emitterProject, callback);
}

public cleallAllProject(callback: (result: p_result) => void): ChildProcess {
Expand Down
12 changes: 9 additions & 3 deletions packages/colibri/src/project_manager/tool/quartus/taskRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function executeCommandList(projectName: string, commands: string[], cwd: string
}

export function runTask(taskType: e_taskType, taskManager: TaskStateManager, quartusDir: string,
projectDir: string, projectName: string, revisionName: string, emitter: ProjectEmitter,
projectDir: string, projectName: string, revisionName: string, family: string, emitter: ProjectEmitter,
callback: (result: p_result) => void): ChildProcess {

const binIP = path_lib.join(quartusDir, "quartus_ipgenerate");
Expand All @@ -145,6 +145,8 @@ export function runTask(taskType: e_taskType, taskManager: TaskStateManager, qua
const binSTA = path_lib.join(quartusDir, "quartus_sta");
const binASM = path_lib.join(quartusDir, "quartus_asm");

const hyperFlexArchitectures = ["agilex", "stratix 10"];

const commandDeclaration: Record<e_taskType, string> = {
[e_taskType.TCLCONSOLE]: "",
[e_taskType.CHANGEDEVICE]: "",
Expand Down Expand Up @@ -191,7 +193,7 @@ export function runTask(taskType: e_taskType, taskManager: TaskStateManager, qua
`${binFit} --read_settings_files=on --write_settings_files=off ${projectName} -c ${revisionName} --route`,

[e_taskType.QUARTUS_FITTERFINALIZE]:
`${binFit} --read_settings_files=on --write_settings_files=off ${projectName} -c ${revisionName} --finalize`,
`${binFit} --read_settings_files=on --write_settings_files=off ${projectName} -c ${revisionName} --retime --finalize`,

[e_taskType.QUARTUS_TIMING]:
`${binSTA} ${projectName} -c ${revisionName} --mode=finalize`,
Expand All @@ -208,7 +210,11 @@ export function runTask(taskType: e_taskType, taskManager: TaskStateManager, qua
for (const dep of dependencies) {
const taskState = taskManager.getTaskState(dep);
if (taskState !== e_taskState.FINISHED) {
cmdList.push(commandDeclaration[dep]);
let depCommand = commandDeclaration[dep];
if (!hyperFlexArchitectures.includes(family.toLocaleLowerCase())){
depCommand = depCommand.replace('--retime', '');
}
cmdList.push(depCommand);
}
}

Expand Down

0 comments on commit fe4fddf

Please sign in to comment.